|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface of the receiver client. Connecting and disconnecting is
initiated by the client, so there are methods for this. Receiving
itself is initiated by the server, so it does not show up here.
See also the counterpart ReceiverClient
.
Method Summary | |
void |
connect(java.lang.String servername,
java.lang.String sessionKey)
Connects to the given server with the given nickname. |
void |
disconnect()
Disconnect from the server. |
boolean |
isConnected()
Checks wether the client is connected. |
void |
join(java.lang.String sessionKey,
java.lang.String channelName)
join specified channel |
void |
leave(java.lang.String channelName)
leave the specified channel |
Method Detail |
public void connect(java.lang.String servername, java.lang.String sessionKey) throws ServiceRefusedException, TimeoutException, java.io.IOException
TextArea
passed in this invocation.servername
- The name of a spChatServer host, in a
notation accepted by Socket.Socket(String,int)
.nickName
- The nickname to use in connecting.outputArea
- Something that can bring incoming messages
to the user of the client.
//X<ServiceRefusedException
- If the server rejected
logging in. Generally not being able to open the socket
produces some java.net exception.TimeoutException
- If the Server did not react within a
certain timeout.java.io.IOException
- For problems in lower layers.
//X>public void disconnect() throws ServiceRefusedException, NotConnectedException, TimeoutException, java.io.IOException
NotConnectedException
- If the client has not been
connected in the first place.java.io.IOException
- For problems in lower layers. The client
is disconnected nonetheless.
//X>public void join(java.lang.String sessionKey, java.lang.String channelName) throws ServiceRefusedException, TimeoutException, NotConnectedException, java.io.IOException
sessionKey
- that identifies the clientString
- the Channel to joinpublic void leave(java.lang.String channelName) throws ServiceRefusedException, TimeoutException, NotConnectedException, java.io.IOException
strChannel
- the channel to leftpublic boolean isConnected()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |