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, receiveDatagramChannel, sendDatagramChannel, udpChannel -
Constructor Summary
ConstructorsConstructorDescriptionReceiveDestinationTransport(UdpChannel udpChannel, MediaDriver.Context context, AtomicCounter localSocketAddressIndicator, ReceiveChannelEndpoint receiveChannelEndpoint) Construct transport for a receiving destination. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()The current control address for the destination.voidcurrentControlAddress(InetSocketAddress newAddress) Store the time current control address for the destination.Get the explicit control address for the channel.booleanHas the channel explicit control address.voidopenChannel(AtomicCounter statusIndicator) Open the channel by the receiver.longGet the time of last activity for the destination.voidtimeOfLastActivityNs(long nowNs) Store the time of last activity for the destination.toString()UdpChannelassociated with the destination.Methods inherited from class io.aeron.driver.media.UdpChannelTransport
bindAddressAndPort, isMulticast, isValidFrame, multicastTtl, onSendError, openDatagramChannel, receive, receiveDatagramChannel, receiveHook, 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:
statusIndicator- for the channel.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classUdpChannelTransport
-
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.
-
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
UdpChannelassociated with the destination.- Overrides:
udpChannelin classUdpChannelTransport- Returns:
- the
UdpChannelassociated 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.
-
toString
-