public class CopyBroadcastReceiver extends Object
Modifier and Type | Field and Description |
---|---|
static int |
SCRATCH_BUFFER_LENGTH
Default length for the scratch buffer for copying messages into.
|
Constructor and Description |
---|
CopyBroadcastReceiver(BroadcastReceiver receiver)
Wrap a
BroadcastReceiver to simplify the API for receiving messages. |
CopyBroadcastReceiver(BroadcastReceiver receiver,
int scratchBufferLength)
Wrap a
BroadcastReceiver to simplify the API for receiving messages. |
CopyBroadcastReceiver(BroadcastReceiver receiver,
MutableDirectBuffer scratchBuffer)
Wrap a
BroadcastReceiver to simplify the API for receiving messages. |
Modifier and Type | Method and Description |
---|---|
BroadcastReceiver |
broadcastReceiver()
Get the underlying
BroadcastReceiver which this is wrapping and copying out of. |
int |
receive(MessageHandler handler)
Receive one message from the broadcast buffer.
|
public static final int SCRATCH_BUFFER_LENGTH
public CopyBroadcastReceiver(BroadcastReceiver receiver, MutableDirectBuffer scratchBuffer)
BroadcastReceiver
to simplify the API for receiving messages.receiver
- to be wrapped.scratchBuffer
- to be used for copying receive buffers.public CopyBroadcastReceiver(BroadcastReceiver receiver, int scratchBufferLength)
BroadcastReceiver
to simplify the API for receiving messages.receiver
- to be wrapped.scratchBufferLength
- is the maximum length of a message to be copied when receiving.public CopyBroadcastReceiver(BroadcastReceiver receiver)
BroadcastReceiver
to simplify the API for receiving messages.receiver
- to be wrapped.public BroadcastReceiver broadcastReceiver()
BroadcastReceiver
which this is wrapping and copying out of.BroadcastReceiver
which this is wrapping and copying out of.public int receive(MessageHandler handler)
handler
- to be called for each message received.Copyright © 2014-2019 Real Logic Ltd. All Rights Reserved.