public class DefaultClientEventHandler extends java.lang.Object implements ClientEventHandler
This implementation will try to provide a default ClientEventHandler implementation. If a ClientCommandHandler is known to have been set then this implementation will look for ClientEventHandler methods in that implementation and pass the corresponding call to that method. This was done to provide backward compatibility with v1.4.5 and prior version of ClientCommandHandler.
Constructor and Description |
---|
DefaultClientEventHandler() |
Modifier and Type | Method and Description |
---|---|
void |
closingConnection(ClientHandler handler)
Method called when client connection is closed.
|
void |
gotConnected(ClientHandler handler)
Method called when there is a new client connects
to the QuickServer.
|
void |
lostConnection(ClientHandler handler)
Method called when client connection is lost.
|
void |
setClientCommandHandler(ClientCommandHandler handler)
Sets ClientCommandHandler that should be examined to
find any ClientEventHandler methods
|
public void setClientCommandHandler(ClientCommandHandler handler)
public void gotConnected(ClientHandler handler) throws java.net.SocketTimeoutException, java.io.IOException
ClientEventHandler
gotConnected
in interface ClientEventHandler
java.net.SocketTimeoutException
- if socket times outjava.io.IOException
- if io error in socketpublic void lostConnection(ClientHandler handler) throws java.io.IOException
ClientEventHandler
lostConnection
in interface ClientEventHandler
java.io.IOException
- if io error in socketpublic void closingConnection(ClientHandler handler) throws java.io.IOException
ClientEventHandler
closingConnection
in interface ClientEventHandler
java.io.IOException
- if io error in socketCopyright © 2003-2014 QuickServer.org