swpchat.protocol
Interface SenderServer
- All Known Implementing Classes:
- SenderProtocolHandler
- public interface SenderServer
This interface defines the API to the Chat Sender protocol on the
server side. Most actions of the server are initiated through the
`line', the connection to the sender client.
Method Summary |
java.lang.String |
getNick()
|
void |
serve(java.net.Socket clientSocket,
ClientConnection clientConnection,
java.io.InputStream inputStream)
Handle requests given by the client through the clientSocket. |
serve
public void serve(java.net.Socket clientSocket,
ClientConnection clientConnection,
java.io.InputStream inputStream)
throws TimeoutException,
java.io.IOException,
java.security.InvalidParameterException
- Handle requests given by the client through the clientSocket.
- Parameters:
clientSocket
- the socket the client is connected to.channel
- the communication context the client connection
is to be entered inclientConnection
- the connection this handler is running
in. It is to be inserted into the connectionCollection.- Throws:
TimeoutException
- thrown if an answer cannot be sent
to the client in time. This is an abstraction from a InterruptedIOException
.java.io.IOException
- General I/O-Exceptions that may have
been raised by lower levels.java.security.InvalidParameterException
- Thrown if clientSocket is
null or otherwise useless.
getNick
public java.lang.String getNick()