Interface Receiver
- All Known Implementing Classes:
AdminClient, BasicTCP, DiagnosticsHandler, FD_SOCK2, GossipRouter, PubClient, PubServer, ReceiverAdapter, RouterStub, TCP, TCP_NIO2
public interface Receiver
Receiver interface to be used with
BaseServer instances- Since:
- 3.6.5
- Author:
- Bela Ban
-
Method Summary
Modifier and TypeMethodDescriptionvoidDelivers a message from a given sender to the applicationdefault voidReceive data from the given senderdefault voidreceive(Address sender, ByteBuffer buf) Delivers a message from a given sender to the application
-
Method Details
-
receive
Delivers a message from a given sender to the application- Parameters:
sender- The sender of the messagebuf- The buffer. An application typically de-serializes data from the buffer into objects used by the application. Note that when receive() returns, it is not safe to use the buffer any longer; if an application needs to use a buffer after this callback returns, it must make a copy.offset- The offset at which the received data startslength- The length of the received data
-
receive
Delivers a message from a given sender to the application- Parameters:
sender- The sender of the messagebuf- The buffer. An application typically de-serializes data from the buffer into objects used by the application. Note that when receive() returns, it is not safe to use the buffer any longer; if an application needs to use a buffer after this callback returns, it must make a copy.Note that buf could be a direct ByteBuffer.
-
receive
-