|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for the server's ControlConnection to client. These methods ar used and must be implemented.
Method Summary | |
void |
disconnect()
finally we have to remove the session from connectedClientCollection and we have to remove our nick and sessionKey from nickNameCollection |
void |
handleNormalRequests(java.util.Vector tokenlist)
method handles the command that is saved in the tokenlist |
void |
notify(java.lang.String nick,
java.lang.String state,
java.lang.String channels)
Notify ClientConnection that 'nick' assumed 'state' concerning 'channels'. |
void |
sendControlMessage(java.lang.String command,
java.lang.String message1,
java.lang.String message2)
method interrupts receiverThread and then receives itself all incoming messages until the reply, we have been waiting (after sending request) for, occurs or comes not within 5 seconds. |
void |
sendRequestMessage(java.lang.String request,
java.lang.String info1,
java.lang.String info2,
java.lang.String info3)
method interrupts receiverThread and then receives itself all incoming messages until the reply, we have been waiting (after sending request) for, occurs or comes not within 5 seconds. |
void |
serve(java.net.Socket socket,
ClientConnection client,
java.io.InputStream inputStream)
implementation of method serve from ProtocolHandler instantiate new ControlProtocolReceiverThread |
Method Detail |
public void serve(java.net.Socket socket, ClientConnection client, java.io.InputStream inputStream) throws TimeoutException, java.io.IOException, java.security.InvalidParameterException
{@link
- java.net.Socket}, the socket that must be served{@link
- swpchat.server.ClientConnection}, the Thread that runs{@link
- java.io.InputStream}, the Stream that must be read fromTimeoutException
- thrown if connection to the client
is lost or too slow.java.io.IOException
- thrown for any I/O error.java.security.InvalidParameterException
- possibly usefulpublic void handleNormalRequests(java.util.Vector tokenlist) throws java.io.IOException, java.net.ProtocolException
{@link
- java.util.Vector} contains the Tokens of the commandjava.net.ProtocolException
- thrown if Protocol is injured.java.io.IOException
- thrown for any I/O error.public void sendControlMessage(java.lang.String command, java.lang.String message1, java.lang.String message2)
control
- is the {@java.lang.String} that identifys the commandmessage1
- is a {@java.lang.String} specifying part1 of messagemessage2
- is a {@java.lang.String} specifying part2 of messagepublic void sendRequestMessage(java.lang.String request, java.lang.String info1, java.lang.String info2, java.lang.String info3)
request
- is the {@java.lang.String} that identifys the requestinfo1
- is a {@java.lang.String} specifying part1 of messageinfo2
- is a {@java.lang.String} specifying part2 of messageinfo3
- is a {@java.lang.String} specifying part3 of messagepublic void notify(java.lang.String nick, java.lang.String state, java.lang.String channels)
nick
- String
specifying the nickname of the concerning
the messagestate
- String
specifying the state 'nick' assumed. The
valid states can be found in NotificationTokens
.channels
- String
specifying the channels joined or left devided
by ';'s. Example: 'nick' joined 'test' and 'swp' up to now. Then channels
can be "test;swp".public void disconnect()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |