wtanaka.praya.irc
Class IRCReplyParser

java.lang.Object
  |
  +--wtanaka.praya.irc.IRCReplyParser

public class IRCReplyParser
extends java.lang.Object

This class is responsible for parsing returned lines from the IRC server (see RFC 1459), and generating messages to send.

Version:
$Name: $ $Date: 2001/08/08 04:53:07 $
Author:
Wesley Tanaka

Field Summary
private static int LUSER
           
private  int m_batchingWhich
          determines the current user of m_parseBuffer.
private  java.lang.StringBuffer m_parseBuffer
          Used to batch up messages
private  IRCClient m_protocol
          The protocol to use to construct Message objects.
private static int MOTD
           
private  Message[] NO_MESSAGES
           
private static int NOTHING
           
private static int WHO
           
private static int WHOIS
           
 
Constructor Summary
IRCReplyParser(IRCClient parent)
           
 
Method Summary
private  Message prepareToProcess(int type)
           
 Message[] processLine(java.lang.String line)
          Calls should be made to this for each line received from the IRC server.
private  void sendPongMessage(java.lang.String pongParam)
          replies to PING
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

NO_MESSAGES

private final Message[] NO_MESSAGES

m_protocol

private final IRCClient m_protocol
The protocol to use to construct Message objects.

m_parseBuffer

private final java.lang.StringBuffer m_parseBuffer
Used to batch up messages

m_batchingWhich

private int m_batchingWhich
determines the current user of m_parseBuffer. If you add a type, be sure to edit prepareToProcess()

NOTHING

private static final int NOTHING

MOTD

private static final int MOTD

WHOIS

private static final int WHOIS

WHO

private static final int WHO

LUSER

private static final int LUSER
Constructor Detail

IRCReplyParser

public IRCReplyParser(IRCClient parent)
Method Detail

prepareToProcess

private Message prepareToProcess(int type)

sendPongMessage

private void sendPongMessage(java.lang.String pongParam)
replies to PING

processLine

public Message[] processLine(java.lang.String line)
Calls should be made to this for each line received from the IRC server.
Returns:
WHERE (self != null) an array of messages to give to the user, in order.