Class MulticastSendingMessageHandler

All Implemented Interfaces:
Runnable, org.reactivestreams.Subscriber<Message<?>>, Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, Lifecycle, Ordered, ExpressionCapable, Orderable, IntegrationPattern, CommonSocketOptions, NamedComponent, IntegrationManagement, ManageableLifecycle, TrackableComponent, MessageHandler, reactor.core.CoreSubscriber<Message<?>>

public class MulticastSendingMessageHandler extends UnicastSendingMessageHandler
A MessageHandler implementation that maps a Message into a UDP datagram packet and sends that to the specified multicast address (224.0.0.0 to 239.255.255.255) and port. The only difference between this and its super class is the ability to specify how many acknowledgments are required to determine success.
Since:
2.0
Author:
Gary Russell, Artem Bilan
  • Constructor Details

    • MulticastSendingMessageHandler

      public MulticastSendingMessageHandler(String address, int port)
      Constructs a MulticastSendingMessageHandler to send data to the multicast address/port.
      Parameters:
      address - The multicast address.
      port - The port.
    • MulticastSendingMessageHandler

      public MulticastSendingMessageHandler(String address, int port, boolean lengthCheck)
      Constructs a MulticastSendingMessageHandler to send data to the multicast address/port and enables setting the lengthCheck option (if set, a length is prepended to the packet and checked at the destination).
      Parameters:
      address - The multicast address.
      port - The port.
      lengthCheck - Enable the lengthCheck option.
    • MulticastSendingMessageHandler

      public MulticastSendingMessageHandler(String address, int port, boolean acknowledge, String ackHost, int ackPort, int ackTimeout)
      Constructs a MulticastSendingMessageHandler to send data to the multicast address/port and enables setting the acknowledge option, where the destination sends a receipt acknowledgment.
      Parameters:
      address - The multicast address.
      port - The port.
      acknowledge - Whether or not acknowledgments are required.
      ackHost - The host to which acknowledgments should be sent; required if acknowledge is true.
      ackPort - The port to which acknowledgments should be sent; required if acknowledge is true.
      ackTimeout - How long to wait (milliseconds) for an acknowledgment.
    • MulticastSendingMessageHandler

      public MulticastSendingMessageHandler(String address, int port, boolean lengthCheck, boolean acknowledge, String ackHost, int ackPort, int ackTimeout)
      Constructs a MulticastSendingMessageHandler to send data to the multicast address/port and enables setting the acknowledge option, where the destination sends a receipt acknowledgment.
      Parameters:
      address - The multicast address.
      port - The port.
      lengthCheck - Enable the lengthCheck option.
      acknowledge - Whether or not acknowledgments are required.
      ackHost - The host to which acknowledgments should be sent; required if acknowledge is true.
      ackPort - The port to which acknowledgments should be sent; required if acknowledge is true.
      ackTimeout - How long to wait (milliseconds) for an acknowledgment.
    • MulticastSendingMessageHandler

      public MulticastSendingMessageHandler(Expression destinationExpression)
      Construct MulticastSendingMessageHandler based on the destination SpEL expression to determine the target destination at runtime against requestMessage.
      Parameters:
      destinationExpression - the SpEL expression to evaluate the target destination at runtime. Must evaluate to String, URI or SocketAddress.
      Since:
      5.0
    • MulticastSendingMessageHandler

      public MulticastSendingMessageHandler(String destinationExpression)
      Construct MulticastSendingMessageHandler based on the destination SpEL expression to determine the target destination at runtime against requestMessage.
      Parameters:
      destinationExpression - the SpEL expression to evaluate the target destination at runtime. Must evaluate to String, URI or SocketAddress.
      Since:
      5.0
  • Method Details