public interface ISctpHandler extends IHandler, ISctpReader
IHandler
interface to cover the SCTP functionalities.Modifier and Type | Method and Description |
---|---|
ISctpSessionConfig |
getConfig()
Returns the configuration object that will be used to configure the
behavior of the associated SCTP session.
|
ISctpSession |
getSession()
Returns the SCTP 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[] data)
Not used.
|
void |
read(byte[] msg,
com.sun.nio.sctp.MessageInfo msgInfo)
Called when a new message was received from the remote end.
|
void |
read(ByteBuffer data)
Not used.
|
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 |
read(Object msg,
com.sun.nio.sctp.MessageInfo msgInfo)
Called when a new message was received and decoded from the input buffer.
|
void |
setSession(ISession session)
Set the SCTP session that will be associated with this handler.
|
void setSession(ISession session)
setSession
in interface IHandler
session
- the SCTP sessionIllegalArgumentException
- when the session argument is not an instance of the
ISctpSession
interface.ISctpSession getSession()
getSession
in interface IHandler
ISctpSessionConfig getConfig()
getConfig
in interface IHandler
ISctpSessionConfig
void read(byte[] data)
void read(ByteBuffer data)
void read(Object msg)
void read(byte[] msg, com.sun.nio.sctp.MessageInfo msgInfo)
The 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 ISctpReader
msg
- the message received from the remote end.msgInfo
- additional ancillary information about the received message.void read(ByteBuffer msg, com.sun.nio.sctp.MessageInfo msgInfo)
The 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 ISctpReader
msg
- the message received from the remote end.msgInfo
- additional ancillary information about the received message.void read(Object msg, com.sun.nio.sctp.MessageInfo msgInfo)
byte[]
and ByteBuffer
.msg
- the message that was received and decoded from the input
buffer.msgInfo
- additional ancillary information about the received message.com.sun.nio.sctp.HandlerResult notification(com.sun.nio.sctp.Notification notification, SctpNotificationType type)
notification
- a notification from the SCTP stacktype
- the type of received notificationCopyright © 2017–2022 SNF4J.ORG. All rights reserved.