|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for the ControlConnection of the client. These methods are used and must be implemented.
Method Summary | |
void |
changeNick(java.lang.String sessionKey,
java.lang.String newNick)
Change the nickname. |
void |
connect(java.lang.String servername,
java.lang.String nickname)
Connect to the server. |
void |
createNewChannel(java.lang.String name,
java.lang.String sendPasswd,
java.lang.String recvPasswd)
sends a create new channel request to the server. |
void |
disconnect()
Disconnect from the server. |
java.lang.String |
getSessionKey()
Gets the actual session key and returns it. |
void |
handleNormalReceiving(java.util.Vector tokenlist)
Handles all received messages a receiver control connection would handle, such as newChannel or removeChannel. |
boolean |
isConnected()
Checks if the control unit is connected to the server. |
void |
removeChannel(java.lang.String name)
removes an existing channel, but not used yet. |
void |
renameChannel(java.lang.String oldname,
java.lang.String newname)
renames an existing channel, but not used yet. |
Method Detail |
public void connect(java.lang.String servername, java.lang.String nickname) throws ServiceRefusedException, TimeoutException, java.io.IOException
servername
- The server to connect to.nickname
- The user's choosen nickname.ServiceRefusedException
- If the server refused the login request.TimeoutException
- If the server does not send the
receipt within a certain timeout.java.io.IOException
- For problems in lower layers.public void changeNick(java.lang.String sessionKey, java.lang.String newNick) throws ServiceRefusedException, NotConnectedException, TimeoutException, java.io.IOException, java.net.ProtocolException
ServiceRefusedException
- If the nickname could not be changed.NotConnectedException
- The client is not connected to
the server.TimeoutException
- If the server does not send the
receipt within a certain timeout.java.io.IOException
- For problems in lower layers.java.net.ProtocolException
- If receiving an unexpected answer.public void createNewChannel(java.lang.String name, java.lang.String sendPasswd, java.lang.String recvPasswd) throws NotConnectedException, java.io.IOException, TimeoutException, ServiceRefusedException
name
- The channel name.sendPasswd
- The password for restricted access for sendersrecvPasswd
- The password for restricted access for receiversNotConnectedException
- if we are not connected to the server.TimeoutException
- if the server does not respond within the timeoutServiceRefusedException
- if the server refuses creating a new channeljava.io.IOException
- on IO propblems in lower layerspublic void renameChannel(java.lang.String oldname, java.lang.String newname) throws NotConnectedException, java.io.IOException, TimeoutException, java.net.ProtocolException, ServiceRefusedException
name
- The channel name.NotConnectedException
- if we are not connected to the server.TimeoutException
- if the server does not respond within the timeoutServiceRefusedException
- if the server refuses creating a new channeljava.io.IOException
- on IO propblems in lower layersjava.net.ProtocolException
- if we receive an unexpected answer.public void removeChannel(java.lang.String name) throws NotConnectedException, java.io.IOException, TimeoutException, java.net.ProtocolException, ServiceRefusedException
name
- The channel name.NotConnectedException
- if we are not connected to the server.TimeoutException
- if the server does not respond within the timeoutServiceRefusedException
- if the server refuses creating a new channeljava.io.IOException
- on IO propblems in lower layersjava.net.ProtocolException
- if we receive an unexpected answer.public void handleNormalReceiving(java.util.Vector tokenlist) throws java.io.IOException, java.net.ProtocolException
tokenlist
- The tokenlist got from InputStream.java.io.IOException
- on problems of lower IO - leveljava.net.ProtocolException
- on receiving an unexpected answerpublic void disconnect() throws NotConnectedException, java.io.IOException, TimeoutException, java.net.ProtocolException
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.TimeoutException
- If the server does not respond
within the timeout.java.net.ProtocolException
- If receiving an unexpected answer.public boolean isConnected()
public java.lang.String getSessionKey()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |