public class UnicastReceivingChannelAdapter extends AbstractInternetProtocolReceivingChannelAdapter
Constructor and Description |
---|
UnicastReceivingChannelAdapter(int port)
Constructs a UnicastReceivingChannelAdapter that listens on the specified port.
|
UnicastReceivingChannelAdapter(int port,
boolean lengthCheck)
Constructs a UnicastReceivingChannelAdapter that listens for packets on
the specified port.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
asyncSendMessage(java.net.DatagramPacket packet) |
protected void |
doStop() |
java.lang.String |
getComponentType() |
protected java.net.DatagramSocket |
getSocket() |
protected java.net.DatagramSocket |
getTheSocket() |
protected void |
onInit() |
protected java.net.DatagramPacket |
receive() |
void |
run() |
protected void |
sendAck(org.springframework.messaging.Message<byte[]> message) |
void |
setLookupHost(boolean lookupHost) |
void |
setSocket(java.net.DatagramSocket socket) |
protected void |
setSocketAttributes(java.net.DatagramSocket socket)
Sets timeout and receive buffer size
|
void |
setSoSendBufferSize(int soSendBufferSize) |
checkTaskExecutor, doStart, getLocalAddress, getPort, getReceiveBufferSize, getSoReceiveBufferSize, getSoTimeout, getTaskExecutor, isActive, isListening, setListening, setLocalAddress, setPoolSize, setReceiveBufferSize, setSoReceiveBufferSize, setSoTimeout, setTaskExecutor
sendMessage, setErrorChannel, setOutputChannel, setSendTimeout, setShouldTrack
doStop, getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
afterPropertiesSet, getApplicationContext, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, toString
public UnicastReceivingChannelAdapter(int port)
port
- The port.public UnicastReceivingChannelAdapter(int port, boolean lengthCheck)
port
- The port.lengthCheck
- If true, enables the lengthCheck Option.protected void onInit()
onInit
in class org.springframework.integration.endpoint.MessageProducerSupport
public void run()
protected void sendAck(org.springframework.messaging.Message<byte[]> message)
protected boolean asyncSendMessage(java.net.DatagramPacket packet)
protected java.net.DatagramPacket receive() throws java.lang.Exception
java.lang.Exception
public void setSocket(java.net.DatagramSocket socket)
socket
- the socket to setprotected java.net.DatagramSocket getTheSocket()
protected java.net.DatagramSocket getSocket()
protected void setSocketAttributes(java.net.DatagramSocket socket) throws java.net.SocketException
socket
- The socket.java.net.SocketException
- Any socket exception.protected void doStop()
doStop
in class AbstractInternetProtocolReceivingChannelAdapter
public void setSoSendBufferSize(int soSendBufferSize)
soSendBufferSize
- The send buffer size.Socket.setSendBufferSize(int)
,
DatagramSocket.setSendBufferSize(int)
public void setLookupHost(boolean lookupHost)
public java.lang.String getComponentType()
getComponentType
in interface org.springframework.integration.support.context.NamedComponent
getComponentType
in class org.springframework.integration.context.IntegrationObjectSupport