public final class DataPacketDispatcher extends Object
PublicationImages streams.
All methods should be called from the Receiver thread.
| Modifier and Type | Method and Description |
|---|---|
void |
addPublicationImage(PublicationImage image)
Add a
PublicationImage to dispatch packets to. |
void |
addSubscription(int streamId)
Add a subscription to a channel for a given stream id and wildcard session id.
|
void |
addSubscription(int streamId,
int sessionId)
Add a subscription to a channel for given stream and session ids.
|
int |
onDataPacket(ReceiveChannelEndpoint channelEndpoint,
DataHeaderFlyweight header,
UnsafeBuffer buffer,
int length,
InetSocketAddress srcAddress,
int transportIndex)
Dispatch a data packet to the registered interest.
|
void |
onRttMeasurement(ReceiveChannelEndpoint channelEndpoint,
RttMeasurementFlyweight msg,
InetSocketAddress srcAddress,
int transportIndex)
Dispatch an RTT measurement message to registered interest.
|
void |
onSetupMessage(ReceiveChannelEndpoint channelEndpoint,
SetupFlyweight msg,
InetSocketAddress srcAddress,
int transportIndex)
Dispatch a setup message to registered interest.
|
void |
removeCoolDown(int sessionId,
int streamId)
Remove a cool down action once it has expired.
|
void |
removePendingSetup(int sessionId,
int streamId)
Remove a pending setup message action once it has been handled.
|
void |
removePublicationImage(PublicationImage image)
Remove a previously added
PublicationImage so packets are no longer dispatched to it. |
void |
removeSubscription(int streamId)
Remove a subscription for a previously registered given stream id and wildcard session id.
|
void |
removeSubscription(int streamId,
int sessionId)
Remove a subscription for a previously registered given stream id and session id.
|
boolean |
shouldElicitSetupMessage()
Should a setup message be elicited for a channel given interest.
|
public void addSubscription(int streamId)
streamId - to capture within a channel.public void addSubscription(int streamId,
int sessionId)
streamId - to capture within a channel.sessionId - to capture within a stream id.public void removeSubscription(int streamId)
streamId - to remove the capture for.public void removeSubscription(int streamId,
int sessionId)
streamId - to remove the capture for.sessionId - within the given stream id.public void addPublicationImage(PublicationImage image)
PublicationImage to dispatch packets to.image - to which the packets are dispatched.public void removePublicationImage(PublicationImage image)
PublicationImage so packets are no longer dispatched to it.image - to which the packets are dispatched.public void removePendingSetup(int sessionId,
int streamId)
sessionId - of the registered interest.streamId - of the registered interest.public void removeCoolDown(int sessionId,
int streamId)
sessionId - of the registered interest.streamId - of the registered interest.public int onDataPacket(ReceiveChannelEndpoint channelEndpoint, DataHeaderFlyweight header, UnsafeBuffer buffer, int length, InetSocketAddress srcAddress, int transportIndex)
channelEndpoint - on which the packet was received.header - of the data first frame.buffer - containing the data packet.length - of the data packet.srcAddress - from which the data packet was received.transportIndex - on which the packet was received.public void onSetupMessage(ReceiveChannelEndpoint channelEndpoint, SetupFlyweight msg, InetSocketAddress srcAddress, int transportIndex)
channelEndpoint - of reception.msg - flyweight over the network packet.srcAddress - the message came from.transportIndex - on which the message was received.public void onRttMeasurement(ReceiveChannelEndpoint channelEndpoint, RttMeasurementFlyweight msg, InetSocketAddress srcAddress, int transportIndex)
channelEndpoint - of reception.msg - flyweight over the network packet.srcAddress - the message came from.transportIndex - on which the message was received.public boolean shouldElicitSetupMessage()
Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.