|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.ip.tcp.TcpReceivingChannelAdapter
public class TcpReceivingChannelAdapter
Tcp inbound channel adapter using a TcpConnection to receive data - if the connection factory is a server factory, this Listener owns the connections. If it is a client factory, the sender owns the connection.
Field Summary |
---|
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport |
---|
logger |
Constructor Summary | |
---|---|
TcpReceivingChannelAdapter()
|
Method Summary | |
---|---|
int |
afterShutdown()
Called after normal shutdown of schedulers, executors etc, and after the shutdown delay has elapsed, but before any forced shutdown of any remaining active scheduler/executor threads.Can optionally return the number of active messages still in process. |
int |
beforeShutdown()
Called before shutdown begins. |
protected void |
doStart()
Takes no action by default. |
protected void |
doStop()
Takes no action by default. |
protected ConnectionFactory |
getClientConnectionFactory()
|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information. |
long |
getRetryInterval()
|
protected org.springframework.scheduling.TaskScheduler |
getScheduler()
|
protected ConnectionFactory |
getServerConnectionFactory()
|
boolean |
isClientMode()
|
boolean |
isClientModeConnected()
|
boolean |
isListening()
|
protected void |
onInit()
Subclasses may implement this for initialization logic. |
boolean |
onMessage(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)
|
void |
setScheduler(org.springframework.scheduling.TaskScheduler scheduler)
|
Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport |
---|
sendMessage, setErrorChannel, setOutputChannel, setSendTimeout, setShouldTrack |
Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint |
---|
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop |
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
---|
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, 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 TcpReceivingChannelAdapter()
Method Detail |
---|
public boolean onMessage(Message<?> message)
TcpListener
onMessage
in interface TcpListener
message
- The message.
protected void onInit()
IntegrationObjectSupport
onInit
in class MessageProducerSupport
protected void doStart()
MessageProducerSupport
doStart
in class MessageProducerSupport
protected void doStop()
MessageProducerSupport
doStop
in class MessageProducerSupport
public void setConnectionFactory(AbstractConnectionFactory connectionFactory)
connectionFactory
- the connectionFactory to setpublic boolean isListening()
public java.lang.String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class IntegrationObjectSupport
protected ConnectionFactory getClientConnectionFactory()
protected ConnectionFactory getServerConnectionFactory()
public boolean isClientMode()
isClientMode
in interface ClientModeCapable
public void setClientMode(boolean isClientMode)
isClientMode
- the isClientMode to setprotected org.springframework.scheduling.TaskScheduler getScheduler()
public void setScheduler(org.springframework.scheduling.TaskScheduler scheduler)
scheduler
- the scheduler 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()
OrderlyShutdownCapable
beforeShutdown
in interface OrderlyShutdownCapable
public int afterShutdown()
OrderlyShutdownCapable
afterShutdown
in interface OrderlyShutdownCapable
|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |