public final class IncomeMessageProcessor extends Object implements SessionCloseListener
| Modifier and Type | Method and Description |
|---|---|
static IncomeMessageProcessor |
getMessageProcessorForPort(int port) |
void |
notifyClosed(SocketChannel socketChannel)
Close callback method
Will be called by NIO framework, when it will decide to close connection
|
void |
notifySessionClose(ConnectionSession connectionSession)
Close callback method
Will be called by Connection.close() to let IncomeMessageProcessor
remove the correspondent session from Map
|
void |
process(ByteBuffer messageBuffer,
SocketChannel socketChannel) |
static IncomeMessageProcessor |
registerListener(int port,
TCPMessageListener listener,
Properties properties) |
static void |
releaseListener(int port) |
public static IncomeMessageProcessor registerListener(int port, @NotNull TCPMessageListener listener, @NotNull Properties properties)
public static void releaseListener(int port)
@Nullable public static IncomeMessageProcessor getMessageProcessorForPort(int port)
public void process(@NotNull
ByteBuffer messageBuffer,
@NotNull
SocketChannel socketChannel)
throws IOException
IOExceptionpublic void notifyClosed(@NotNull
SocketChannel socketChannel)
public void notifySessionClose(@NotNull
ConnectionSession connectionSession)
notifySessionClose in interface SessionCloseListenerCopyright © 2005–2018 Oracle Corporation. All rights reserved.