Class ReceiveDestinationTransport

java.lang.Object
io.aeron.driver.media.UdpChannelTransport
io.aeron.driver.media.ReceiveDestinationTransport
All Implemented Interfaces:
AutoCloseable

public final class ReceiveDestinationTransport extends UdpChannelTransport
Destination endpoint representation for reception into an image from a UDP transport.
  • 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

      public void openChannel(DriverConductorProxy conductorProxy, AtomicCounter statusIndicator)
      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

      public InetSocketAddress explicitControlAddress()
      Get the explicit control address for the channel.
      Returns:
      the explicit control address for the channel if set, otherwise null.
    • selectionKey

      public void selectionKey(SelectionKey key)
      Store the SelectionKey for the registered transport.
      Parameters:
      key - the SelectionKey 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

      public UdpChannel udpChannel()
      UdpChannel associated with the destination.
      Overrides:
      udpChannel in class UdpChannelTransport
      Returns:
      the UdpChannel associated with the destination.
    • currentControlAddress

      public void currentControlAddress(InetSocketAddress newAddress)
      Store the time current control address for the destination.
      Parameters:
      newAddress - control address for the destination.
    • currentControlAddress

      public InetSocketAddress currentControlAddress()
      The current control address for the destination.
      Returns:
      the time current control address for the destination.