public class TcpReceivingChannelAdapter extends org.springframework.integration.endpoint.MessageProducerSupport implements TcpListener, ClientModeCapable, org.springframework.integration.context.OrderlyShutdownCapable
Constructor and Description |
---|
TcpReceivingChannelAdapter() |
Modifier and Type | Method and Description |
---|---|
int |
afterShutdown() |
int |
beforeShutdown() |
protected void |
doStart() |
protected void |
doStop() |
protected ConnectionFactory |
getClientConnectionFactory() |
java.lang.String |
getComponentType() |
long |
getRetryInterval() |
protected ConnectionFactory |
getServerConnectionFactory() |
boolean |
isClientMode() |
boolean |
isClientModeConnected() |
boolean |
isListening() |
protected void |
onInit() |
boolean |
onMessage(org.springframework.messaging.Message<?> message)
Called by a TCPConnection when a new message arrives.
|
void |
retryConnection()
Immediately attempt to establish the connection.
|
void |
setClientMode(boolean isClientMode) |
void |
setConnectionFactory(AbstractConnectionFactory connectionFactory)
Sets the client or server connection factory; for this (an inbound adapter), if
the factory is a client connection factory, the sockets are owned by a sending
channel adapter and this adapter is used to receive replies.
|
void |
setRetryInterval(long retryInterval) |
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 boolean onMessage(org.springframework.messaging.Message<?> message)
TcpListener
onMessage
in interface TcpListener
message
- The message.protected void onInit()
onInit
in class org.springframework.integration.endpoint.MessageProducerSupport
protected void doStart()
doStart
in class org.springframework.integration.endpoint.MessageProducerSupport
protected void doStop()
doStop
in class org.springframework.integration.endpoint.MessageProducerSupport
public void setConnectionFactory(AbstractConnectionFactory connectionFactory)
connectionFactory
- the connectionFactory to setpublic boolean isListening()
public java.lang.String getComponentType()
getComponentType
in interface org.springframework.integration.support.context.NamedComponent
getComponentType
in class org.springframework.integration.context.IntegrationObjectSupport
protected ConnectionFactory getClientConnectionFactory()
protected ConnectionFactory getServerConnectionFactory()
public boolean isClientMode()
isClientMode
in interface ClientModeCapable
public void setClientMode(boolean isClientMode)
isClientMode
- the isClientMode to setpublic long getRetryInterval()
public void setRetryInterval(long retryInterval)
retryInterval
- the retryInterval to setpublic boolean isClientModeConnected()
isClientModeConnected
in interface ClientModeCapable
public void retryConnection()
ClientModeCapable
retryConnection
in interface ClientModeCapable
public int beforeShutdown()
beforeShutdown
in interface org.springframework.integration.context.OrderlyShutdownCapable
public int afterShutdown()
afterShutdown
in interface org.springframework.integration.context.OrderlyShutdownCapable