|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.context.IntegrationObjectSupport org.springframework.integration.handler.AbstractMessageHandler org.springframework.integration.ip.AbstractInternetProtocolSendingMessageHandler org.springframework.integration.ip.udp.UnicastSendingMessageHandler org.springframework.integration.ip.udp.MulticastSendingMessageHandler
public class MulticastSendingMessageHandler
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.
Field Summary |
---|
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport |
---|
logger |
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
MulticastSendingMessageHandler(java.lang.String address,
int port)
Constructs a MulticastSendingMessageHandler to send data to the multicast address/port. |
|
MulticastSendingMessageHandler(java.lang.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(java.lang.String address,
int port,
boolean lengthCheck,
boolean acknowledge,
java.lang.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(java.lang.String address,
int port,
boolean acknowledge,
java.lang.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. |
Method Summary | |
---|---|
protected java.net.DatagramSocket |
getSocket()
|
void |
setLocalAddress(java.lang.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. |
Methods inherited from class org.springframework.integration.ip.udp.UnicastSendingMessageHandler |
---|
getAckPort, getComponentType, getSoReceiveBufferSize, getTheSocket, handleMessageInternal, isAcknowledge, onInit, restartAckThread, run, send, setAckCounter, setReliabilityAttributes, setSocket, setSocketAttributes, setSoReceiveBufferSize, setTaskExecutor, shutDown |
Methods inherited from class org.springframework.integration.ip.AbstractInternetProtocolSendingMessageHandler |
---|
getDestinationAddress, getHost, getPort, getSoSendBufferSize, getSoTimeout, setSoSendBufferSize, setSoTimeout |
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler |
---|
getOrder, handleMessage, setOrder, setShouldTrack |
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
---|
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.springframework.integration.context.NamedComponent |
---|
getComponentName |
Constructor Detail |
---|
public MulticastSendingMessageHandler(java.lang.String address, int port)
address
- The multicast address.port
- The port.public MulticastSendingMessageHandler(java.lang.String address, int port, boolean lengthCheck)
address
- The multicast address.port
- The port.lengthCheck
- Enable the lengthCheck option.public MulticastSendingMessageHandler(java.lang.String address, int port, boolean acknowledge, java.lang.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(java.lang.String address, int port, boolean lengthCheck, boolean acknowledge, java.lang.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.Method Detail |
---|
protected java.net.DatagramSocket getSocket() throws java.io.IOException
getSocket
in class UnicastSendingMessageHandler
java.io.IOException
public void setMinAcksForSuccess(int minAcksForSuccess)
minAcksForSuccess
- public void setTimeToLive(int timeToLive)
MulticastSocket
time to live property.
timeToLive
- MulticastSocket.setTimeToLive(int)
public void setLocalAddress(java.lang.String localAddress)
CommonSocketOptions
setLocalAddress
in interface CommonSocketOptions
setLocalAddress
in class UnicastSendingMessageHandler
|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |