ikrs.yuccasrv.socketmngr
Interface BindListener
- All Known Implementing Classes:
- BindAdapter, ConnectionHandler, HTTPHandler, ServerSocketTableModel, TCPAdapter, Yucca
public interface BindListener
This interface declares all listener methods to receive events
from the bind manager (server opened, incoming connection, server error,
server closed).
Method Summary |
void |
finalize(long time,
java.util.concurrent.TimeUnit unit)
This method will be called if the SocketManager is going to terminate. |
void |
serverAcceptedTCPConnection(BindManager source,
java.util.UUID socketID,
java.net.Socket sock,
ConnectionUserID<ConnectionUserID> userID)
|
void |
serverAcceptedUDPConnection(BindManager source,
java.util.UUID socketID,
java.net.DatagramSocket sock,
ConnectionUserID<ConnectionUserID> userID)
|
void |
serverClosed(BindManager source,
java.util.UUID socketID)
|
void |
serverCreated(BindManager source,
java.util.UUID socketID)
|
void |
serverError(BindManager source,
java.util.UUID socketID,
java.lang.Exception e,
boolean isTraumatic)
|
serverCreated
void serverCreated(BindManager source,
java.util.UUID socketID)
- Parameters:
source
- The BindManager that reports the event.socketID
- A unique ID to identify the created socket by the use of
BindManager.getServer*( socketID ).
serverError
void serverError(BindManager source,
java.util.UUID socketID,
java.lang.Exception e,
boolean isTraumatic)
- Parameters:
source
- The BindManager that reports the event.socketID
- The server's unique ID.e
- The reported exception.isTraumatic
- This flag tell if the server socket can still
be used or if it's (probably) broken and should be
restarted. In the second case the BindManager will
automatically close and remove the socket to free
the resources.
serverAcceptedTCPConnection
void serverAcceptedTCPConnection(BindManager source,
java.util.UUID socketID,
java.net.Socket sock,
ConnectionUserID<ConnectionUserID> userID)
- Parameters:
source
- The BindManager that reports the event.sockedID
- The server socket's unique ID.sock
- The accepted connection socket.
serverAcceptedUDPConnection
void serverAcceptedUDPConnection(BindManager source,
java.util.UUID socketID,
java.net.DatagramSocket sock,
ConnectionUserID<ConnectionUserID> userID)
- Parameters:
source
- The BindManager that reports the event.sockedID
- The server socket's unique ID.sock
- The accepted connection socket.
serverClosed
void serverClosed(BindManager source,
java.util.UUID socketID)
- Parameters:
source
- The BindManager that reports the event.sockedID
- The server socket's unique ID.
finalize
void finalize(long time,
java.util.concurrent.TimeUnit unit)
- This method will be called if the SocketManager is going to terminate.
All associated BindListener MUST terminate within the given time.
- Parameters:
time
- The time value all dependent child threads have to terminate in.unit
- The time unit.