public class MulticastSendingMessageHandler extends UnicastSendingMessageHandler
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.IntegrationManagement.ManagementOverridesEXPRESSION_PARSER, loggerHIGHEST_PRECEDENCE, LOWEST_PRECEDENCEMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Constructor and Description |
|---|
MulticastSendingMessageHandler(Expression destinationExpression)
Construct MulticastSendingMessageHandler based on the destination SpEL expression to
determine the target destination at runtime against requestMessage.
|
MulticastSendingMessageHandler(String destinationExpression)
Construct MulticastSendingMessageHandler based on the destination SpEL expression to
determine the target destination at runtime against requestMessage.
|
MulticastSendingMessageHandler(String address,
int port)
Constructs a MulticastSendingMessageHandler to send data to the multicast address/port.
|
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).
|
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.
|
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.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
convertAndSend(Message<?> message) |
protected DatagramSocket |
getSocket() |
void |
setLocalAddress(String localAddress)
On a multi-homed system, specifies the ip address of the network interface used to communicate.
|
void |
setMinAcksForSuccess(int minAcksForSuccess)
If acknowledge = true; how many acks needed for success.
|
void |
setTimeToLive(int timeToLive)
Set the underlying
MulticastSocket time to live property. |
doStart, doStop, getAckPort, getComponentType, getSoReceiveBufferSize, getTheSocket, handleMessageInternal, isAcknowledge, onInit, restartAckThread, run, setAckCounter, setLengthCheck, setReliabilityAttributes, setSocket, setSocketAttributes, setSocketCustomizer, setSocketExpression, setSocketExpressionString, setSoReceiveBufferSize, setTaskExecutor, startAckThread, updateAckAddressgetDestinationAddress, getHost, getPort, getSoSendBufferSize, getSoTimeout, isRunning, setSoSendBufferSize, setSoTimeout, start, stophandleMessage, onComplete, onError, onNext, onSubscribebuildSendTimer, destroy, getIntegrationPatternType, getManagedName, getManagedType, getMetricsCaptor, getOrder, getOverrides, isLoggingEnabled, registerMetricsCaptor, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetThisAsgetBeanName, getComponentNamepublic MulticastSendingMessageHandler(String address, int port)
address - The multicast address.port - The port.public MulticastSendingMessageHandler(String address, int port, boolean lengthCheck)
address - The multicast address.port - The port.lengthCheck - Enable the lengthCheck option.public MulticastSendingMessageHandler(String address, int port, boolean acknowledge, String ackHost, int ackPort, int ackTimeout)
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.public MulticastSendingMessageHandler(String address, int port, boolean lengthCheck, boolean acknowledge, String ackHost, int ackPort, int ackTimeout)
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.public MulticastSendingMessageHandler(Expression destinationExpression)
destinationExpression - the SpEL expression to evaluate the target destination
at runtime. Must evaluate to String, URI or
SocketAddress.public MulticastSendingMessageHandler(String destinationExpression)
destinationExpression - the SpEL expression to evaluate the target destination
at runtime. Must evaluate to String, URI or
SocketAddress.protected DatagramSocket getSocket() throws IOException
getSocket in class UnicastSendingMessageHandlerIOExceptionpublic void setMinAcksForSuccess(int minAcksForSuccess)
minAcksForSuccess - The minimum number of acks that will represent success.public void setTimeToLive(int timeToLive)
MulticastSocket time to live property.timeToLive - MulticastSocket.setTimeToLive(int)public void setLocalAddress(String localAddress)
CommonSocketOptionssetLocalAddress in interface CommonSocketOptionssetLocalAddress in class UnicastSendingMessageHandlerlocalAddress - The local address.protected void convertAndSend(Message<?> message) throws IOException, URISyntaxException
convertAndSend in class UnicastSendingMessageHandlerIOExceptionURISyntaxException