public class TcpReceivingChannelAdapter extends org.springframework.integration.endpoint.MessageProducerSupport implements TcpListener, ClientModeCapable, org.springframework.integration.context.OrderlyShutdownCapable
lifecycleCondition, lifecycleLock| 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) |
afterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getMessagingTemplate, getOutputChannel, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrackdestroy, doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, setTaskScheduler, start, stop, stopafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, toStringpublic boolean onMessage(org.springframework.messaging.Message<?> message)
TcpListeneronMessage in interface TcpListenermessage - The message.protected void onInit()
onInit in class org.springframework.integration.endpoint.MessageProducerSupportprotected void doStart()
doStart in class org.springframework.integration.endpoint.MessageProducerSupportprotected void doStop()
doStop in class org.springframework.integration.endpoint.MessageProducerSupportpublic void setConnectionFactory(AbstractConnectionFactory connectionFactory)
connectionFactory - the connectionFactory to setpublic boolean isListening()
public java.lang.String getComponentType()
getComponentType in interface org.springframework.integration.support.context.NamedComponentgetComponentType in class org.springframework.integration.context.IntegrationObjectSupportprotected ConnectionFactory getClientConnectionFactory()
protected ConnectionFactory getServerConnectionFactory()
public boolean isClientMode()
isClientMode in interface ClientModeCapablepublic 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 ClientModeCapablepublic void retryConnection()
ClientModeCapableretryConnection in interface ClientModeCapablepublic int beforeShutdown()
beforeShutdown in interface org.springframework.integration.context.OrderlyShutdownCapablepublic int afterShutdown()
afterShutdown in interface org.springframework.integration.context.OrderlyShutdownCapable