Class UnicastReceivingChannelAdapter

All Implemented Interfaces:
Runnable, Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, SmartInitializingSingleton, ApplicationContextAware, ApplicationEventPublisherAware, Lifecycle, Phased, SmartLifecycle, ExpressionCapable, MessageProducer, IntegrationPattern, CommonSocketOptions, NamedComponent, IntegrationInboundManagement, IntegrationManagement, ManageableLifecycle, ManageableSmartLifecycle, TrackableComponent, SchedulingAwareRunnable
Direct Known Subclasses:
MulticastReceivingChannelAdapter

public class UnicastReceivingChannelAdapter extends AbstractInternetProtocolReceivingChannelAdapter
A channel adapter to receive incoming UDP packets. Packets can optionally be preceded by a 4 byte length field, used to validate that all data was received. Packets may also contain information indicating an acknowledgment needs to be sent.
Since:
2.0
Author:
Gary Russell, Artem Bilan, Christian Tzolov
  • Field Details

    • lock

      protected final Lock lock
  • Constructor Details

    • UnicastReceivingChannelAdapter

      public UnicastReceivingChannelAdapter(int port)
      Constructs a UnicastReceivingChannelAdapter that listens on the specified port.
      Parameters:
      port - The port.
    • UnicastReceivingChannelAdapter

      public UnicastReceivingChannelAdapter(int port, boolean lengthCheck)
      Constructs a UnicastReceivingChannelAdapter that listens for packets on the specified port. Enables setting the lengthCheck option, which expects a length to precede the incoming packets.
      Parameters:
      port - The port.
      lengthCheck - If true, enables the lengthCheck Option.
  • Method Details