|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--irc.IRCObject | +--irc.ServerProtocol
The raw irc server protocol handler.
Field Summary |
Fields inherited from class irc.IRCObject |
_ircConfiguration |
Constructor Summary | |
ServerProtocol(IRCConfiguration config)
Create a new ServerProtocol. |
Method Summary | |
void |
addServerProtocolListener(ServerProtocolListener lis)
Add a listener. |
void |
connect(java.lang.String host,
int port)
Connect to the server. |
boolean |
connected()
Return connected status. |
boolean |
connecting()
Return connecting status. |
void |
disconnect()
Disconnect from server. |
int |
getLocalPort()
Get the local, client-side tcp port for the current connection. |
void |
removeServerProtocolListener(ServerProtocolListener lis)
Remove a listener. |
void |
run()
|
void |
sendCommand(java.lang.String command,
java.lang.String[] params)
Send a formatted string to the server. |
void |
sendString(java.lang.String str)
Send a raw string to the server. |
Methods inherited from class irc.IRCObject |
getColor, getIRCConfiguration, getText, getText, getText, getText, getTimeStamp, release |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ServerProtocol(IRCConfiguration config)
config
- global irc configuration.Method Detail |
public void connect(java.lang.String host, int port)
host
- server host.port
- server port.public boolean connected()
public boolean connecting()
public void disconnect()
public int getLocalPort()
public void run()
run
in interface java.lang.Runnable
public void addServerProtocolListener(ServerProtocolListener lis)
lis
- listener to add.public void removeServerProtocolListener(ServerProtocolListener lis)
lis
- listener to remove.public void sendString(java.lang.String str) throws java.lang.Exception
str
- string to send.
java.lang.Exception
- if something went wrong.public void sendCommand(java.lang.String command, java.lang.String[] params) throws java.lang.Exception
command
- comment to send.params
- parameters list. Only the last parameter can contain blanks.
java.lang.Exception
- if something went wrong.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |