public class SessionHandler extends AbstractDatagramHandler
| Modifier and Type | Method and Description |
|---|---|
void |
event(SessionEvent event)
Called to notify about a change of the associated session state.
|
void |
exception(Throwable e)
Called to notify about an exception caught during processing of I/O or
protocol related operations.
|
ISessionConfig |
getConfig()
Returns the configuration object that will be used to configure the
behavior of the associated session.
|
ISessionStructureFactory |
getFactory()
Returns the factory object that will be used to configure the internal
structure of the associated session.
|
boolean |
incident(SessionIncident incident,
Throwable t)
Called to notify about an incident that occurred during processing of I/O
or protocol related operations.
|
void |
read(Object msg)
Called when a new message was read and decoded from the input buffer.
|
void |
read(SocketAddress remoteAddress,
Object msg)
Called when a new message was received and decoded from a remote end
that is identified by the given remote address.
|
void |
timer(Object event)
Called to notify about an expiration of the timer identified by the
specified event object.
|
event, getSession, read, read, setSessionevent, getName, read, read, timerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitread, readpublic void read(SocketAddress remoteAddress, Object msg)
IDatagramHandlerbyte[] and ByteBuffer.
The method is only called for sessions created with a disconnected datagram channel.
remoteAddress - address of the remote end.msg - the message received from the remote end.public void read(Object msg)
IHandlerbyte[] and ByteBuffer.msg - the message that was read and decoded from the input buffer.public void timer(Object event)
IHandlertimer in interface IHandlertimer in class AbstractHandlerevent - the event object that identifies the timerpublic void event(SessionEvent event)
IHandlerevent in interface IHandlerevent in class AbstractHandlerevent - an event related with the change of the session stateSessionEventpublic void exception(Throwable e)
IHandlerexception in interface IHandlerexception in class AbstractHandlere - the exception caughtpublic boolean incident(SessionIncident incident, Throwable t)
IHandlerincident in interface IHandlerincident in class AbstractHandlerincident - an incident that occurredt - an exception that is related with the incident or
nulltrue to indicate that the incident was handled and
the default action should not be executed by the SNF4J framework
underneath.public ISessionStructureFactory getFactory()
IHandlergetFactory in interface IHandlergetFactory in class AbstractHandlerISessionStructureFactorypublic ISessionConfig getConfig()
IHandlergetConfig in interface IHandlergetConfig in class AbstractHandlerISessionConfigCopyright © 2017–2022 SNF4J.ORG. All rights reserved.