public abstract class AbstractSctpHandler extends AbstractHandler implements ISctpHandler
ISctpHandler interface.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSctpHandler()
Default constructor creating an unnamed SCTP handler.
|
protected |
AbstractSctpHandler(String name)
Constructor creating a named SCTP handler.
|
| Modifier and Type | Method and Description |
|---|---|
ISctpSessionConfig |
getConfig()
Returns the configuration object that will be used to configure the
behavior of the associated session.
|
ISctpSession |
getSession()
Returns the session that is associated with this handler.
|
com.sun.nio.sctp.HandlerResult |
notification(com.sun.nio.sctp.Notification notification,
SctpNotificationType type)
Handles notifications from the SCTP stack.
|
void |
read(byte[] msg,
com.sun.nio.sctp.MessageInfo msgInfo)
Called when a new message was received from the remote end.
|
void |
read(ByteBuffer msg,
com.sun.nio.sctp.MessageInfo msgInfo)
Called when a new message was received from the remote end.
|
void |
read(Object msg)
Not used.
|
void |
setSession(ISession session)
Sets the session that will be associated with this handler.
|
event, event, exception, getFactory, getName, incident, read, read, timer, timerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitread, read, readprotected AbstractSctpHandler()
protected AbstractSctpHandler(String name)
name - the name for this handlerpublic void setSession(ISession session)
IHandlersetSession in interface IHandlersetSession in interface ISctpHandlersetSession in class AbstractHandlersession - the sessionpublic ISctpSession getSession()
IHandlergetSession in interface IHandlergetSession in interface ISctpHandlergetSession in class AbstractHandlerpublic ISctpSessionConfig getConfig()
IHandlergetConfig in interface IHandlergetConfig in interface ISctpHandlergetConfig in class AbstractHandlerISessionConfigpublic void read(byte[] msg,
com.sun.nio.sctp.MessageInfo msgInfo)
ISctpHandlerThe passed array can be safely stored or modified by this method as it will not be used by the caller.
This method is also called when the associated session is configured with a
codec pipeline in which the last decoder produces outbound object(s) of the
byte[] type.
read in interface ISctpHandlerread in interface ISctpReadermsg - the message received from the remote end.msgInfo - additional ancillary information about the received message.public void read(ByteBuffer msg, com.sun.nio.sctp.MessageInfo msgInfo)
ISctpHandlerThe passed buffer can be safely stored or modified by this method as it will not be used by the caller.
This method is also called when the associated session is configured with a
codec pipeline in which the last decoder produces outbound object(s) of the
ByteBuffer type.
read in interface ISctpHandlerread in interface ISctpReadermsg - the message received from the remote end.msgInfo - additional ancillary information about the received message.public void read(Object msg)
It does nothing by default.
read in interface IHandlerread in interface ISctpHandlermsg - the message that was read and decoded from the input buffer.public com.sun.nio.sctp.HandlerResult notification(com.sun.nio.sctp.Notification notification,
SctpNotificationType type)
It returns HandlerResult.CONTINUE by default.
notification in interface ISctpHandlernotification - a notification from the SCTP stacktype - the type of received notificationCopyright © 2017–2022 SNF4J.ORG. All rights reserved.