public class DataPacketDispatcher extends java.lang.Object implements DataPacketHandler, SetupMessageHandler
PublicationImages streams.
All methods should be called via Receiver thread| Modifier and Type | Class and Description |
|---|---|
static class |
DataPacketDispatcher.SessionStatus |
| Constructor and Description |
|---|
DataPacketDispatcher(DriverConductorProxy conductorProxy,
Receiver receiver) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPublicationImage(PublicationImage image) |
void |
addSubscription(int streamId) |
int |
onDataPacket(ReceiveChannelEndpoint channelEndpoint,
io.aeron.protocol.DataHeaderFlyweight header,
org.agrona.concurrent.UnsafeBuffer buffer,
int length,
java.net.InetSocketAddress srcAddress)
Handle a Data Frame from the network.
|
void |
onRttMeasurement(ReceiveChannelEndpoint channelEndpoint,
io.aeron.protocol.RttMeasurementFlyweight header,
java.net.InetSocketAddress srcAddress) |
void |
onSetupMessage(ReceiveChannelEndpoint channelEndpoint,
io.aeron.protocol.SetupFlyweight header,
org.agrona.concurrent.UnsafeBuffer buffer,
java.net.InetSocketAddress srcAddress)
Handle a Setup Frame
|
void |
removeCoolDown(int sessionId,
int streamId) |
void |
removePendingSetup(int sessionId,
int streamId) |
void |
removePublicationImage(PublicationImage image) |
void |
removeSubscription(int streamId) |
boolean |
shouldElicitSetupMessage() |
public DataPacketDispatcher(DriverConductorProxy conductorProxy, Receiver receiver)
public void addSubscription(int streamId)
public void removeSubscription(int streamId)
public void addPublicationImage(PublicationImage image)
public void removePublicationImage(PublicationImage image)
public void removePendingSetup(int sessionId,
int streamId)
public void removeCoolDown(int sessionId,
int streamId)
public int onDataPacket(ReceiveChannelEndpoint channelEndpoint, io.aeron.protocol.DataHeaderFlyweight header, org.agrona.concurrent.UnsafeBuffer buffer, int length, java.net.InetSocketAddress srcAddress)
DataPacketHandleronDataPacket in interface DataPacketHandlerchannelEndpoint - from which the data is delivered.header - of the first Data Frame in the packet (may be re-wrapped if needed)buffer - holding the data (always starts at 0 offset)length - of the packet (may be longer than the header frame length)srcAddress - of the packetpublic void onSetupMessage(ReceiveChannelEndpoint channelEndpoint, io.aeron.protocol.SetupFlyweight header, org.agrona.concurrent.UnsafeBuffer buffer, java.net.InetSocketAddress srcAddress)
SetupMessageHandleronSetupMessage in interface SetupMessageHandlerchannelEndpoint - from which the message is delivered.header - of the Setup Frame in the message (may be re-wrapped if needed)buffer - holding the Setup Info (always starts at 0 offset)srcAddress - of the Framepublic void onRttMeasurement(ReceiveChannelEndpoint channelEndpoint, io.aeron.protocol.RttMeasurementFlyweight header, java.net.InetSocketAddress srcAddress)
public boolean shouldElicitSetupMessage()
Copyright © 2014 - 2016 Real Logic Ltd. All Rights Reserved.