Package io.aeron.driver.media
Class ReceiveDestinationTransport
java.lang.Object
io.aeron.driver.media.UdpChannelTransport
io.aeron.driver.media.ReceiveDestinationTransport
- All Implemented Interfaces:
AutoCloseable
Destination endpoint representation for reception into an image from a UDP transport.
-
Field Summary
Fields inherited from class io.aeron.driver.media.UdpChannelTransport
connectAddress, context, errorHandler, isClosed, receiveDatagramChannel, selectionKey, sendDatagramChannel, udpChannel
-
Constructor Summary
ConstructorDescriptionReceiveDestinationTransport
(UdpChannel udpChannel, MediaDriver.Context context, AtomicCounter localSocketAddressIndicator, ReceiveChannelEndpoint receiveChannelEndpoint) Construct transport for a receiving destination. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Close indicator counters associated with the transport.void
Close the networking elements of the ReceiveChannelEndpoint, but leave other components (e.g.The current control address for the destination.void
currentControlAddress
(InetSocketAddress newAddress) Store the time current control address for the destination.Get the explicit control address for the channel.boolean
Has the channel explicit control address.void
openChannel
(DriverConductorProxy conductorProxy, AtomicCounter statusIndicator) Open the channel by the receiver.void
selectionKey
(SelectionKey key) Store theSelectionKey
for the registered transport.long
Get the time of last activity for the destination.void
timeOfLastActivityNs
(long nowNs) Store the time of last activity for the destination.UdpChannel
associated with the destination.Methods inherited from class io.aeron.driver.media.UdpChannelTransport
bindAddressAndPort, close, isClosed, isMulticast, isValidFrame, multicastTtl, onSendError, openDatagramChannel, receive, receiveDatagramChannel, receiveHook, registerForRead, resendHook, sendError, sendHook, socketRcvbufLength, socketSndbufLength, updateEndpoint
-
Constructor Details
-
ReceiveDestinationTransport
public ReceiveDestinationTransport(UdpChannel udpChannel, MediaDriver.Context context, AtomicCounter localSocketAddressIndicator, ReceiveChannelEndpoint receiveChannelEndpoint) Construct transport for a receiving destination.- Parameters:
udpChannel
- for the destination.context
- for configuration.localSocketAddressIndicator
- to indicate status of the transport.receiveChannelEndpoint
- to which this destination belongs.
-
-
Method Details
-
openChannel
Open the channel by the receiver.- Parameters:
conductorProxy
- for sending instructions by to the driver conductor.statusIndicator
- for the channel.
-
closeTransport
public void closeTransport()Close the networking elements of the ReceiveChannelEndpoint, but leave other components (e.g. counters) in place. -
closeIndicators
public void closeIndicators()Close indicator counters associated with the transport. -
hasExplicitControl
public boolean hasExplicitControl()Has the channel explicit control address.- Returns:
- true if the channel has explicit control address.
-
explicitControlAddress
Get the explicit control address for the channel.- Returns:
- the explicit control address for the channel if set, otherwise null.
-
selectionKey
Store theSelectionKey
for the registered transport.- Parameters:
key
- theSelectionKey
for the registered transport.
-
timeOfLastActivityNs
public void timeOfLastActivityNs(long nowNs) Store the time of last activity for the destination.- Parameters:
nowNs
- the time of last activity for the destination.
-
timeOfLastActivityNs
public long timeOfLastActivityNs()Get the time of last activity for the destination.- Returns:
- the time of last activity for the destination.
-
udpChannel
UdpChannel
associated with the destination.- Overrides:
udpChannel
in classUdpChannelTransport
- Returns:
- the
UdpChannel
associated with the destination.
-
currentControlAddress
Store the time current control address for the destination.- Parameters:
newAddress
- control address for the destination.
-
currentControlAddress
The current control address for the destination.- Returns:
- the time current control address for the destination.
-