ikrs.yuccasrv.socketmngr
Class BindAdapter
java.lang.Object
ikrs.yuccasrv.socketmngr.BindAdapter
- All Implemented Interfaces:
- BindListener
public abstract class BindAdapter
- extends java.lang.Object
- implements BindListener
This abstract class implements all method from the BindListener interface - but
it leaves all methos bodies empty.
- Inherit from this class an implement those methods you need by overwriting them.
- Install an instance of your class as a listener to the BindManager to receive
socket events.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BindAdapter
public BindAdapter()
serverCreated
public void serverCreated(BindManager source,
java.util.UUID socketID)
- Specified by:
serverCreated
in interface BindListener
- 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
public void serverError(BindManager source,
java.util.UUID socketID,
java.lang.Exception e,
boolean isTraumatic)
- Specified by:
serverError
in interface BindListener
- 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
public void serverAcceptedTCPConnection(BindManager source,
java.util.UUID socketID,
java.net.Socket sock)
- Parameters:
source
- The BindManager that reports the event.sockedID
- The server socket's unique ID.sock
- The accepted connection socket.
serverAcceptedUDPConnection
public void serverAcceptedUDPConnection(BindManager source,
java.util.UUID socketID,
java.net.DatagramSocket sock)
- Parameters:
source
- The BindManager that reports the event.sockedID
- The server socket's unique ID.sock
- The accepted connection socket.
serverClosed
public void serverClosed(BindManager source,
java.util.UUID socketID)
- Specified by:
serverClosed
in interface BindListener
- Parameters:
source
- The BindManager that reports the event.sockedID
- The server socket's unique ID.