|
|||||||||
| 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.gateway.MessagingGatewaySupport
org.springframework.integration.ip.tcp.TcpInboundGateway
public class TcpInboundGateway
Inbound Gateway using a server connection factory - threading is controlled by the
factory. For java.net connections, each socket can process only one message at a time.
For java.nio connections, messages may be multiplexed but the client will need to
provide correlation logic. If the client is a TcpOutboundGateway multiplexing
is not used, but multiple concurrent connections can be used if the connection factory uses
single-use connections. For true asynchronous bi-directional communication, a pair of
inbound / outbound channel adapters should be used.
| Field Summary |
|---|
| Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
TcpInboundGateway()
|
|
| Method Summary | |
|---|---|
void |
addNewConnection(TcpConnection connection)
When we are using sockets owned by a TcpListener, this
method is called each time a new connection is made. |
int |
afterShutdown()
|
int |
beforeShutdown()
|
protected void |
doStart()
|
protected void |
doStop()
|
java.lang.String |
getComponentType()
|
long |
getRetryInterval()
|
boolean |
isClientMode()
|
boolean |
isClientModeConnected()
|
boolean |
isListening()
|
protected void |
onInit()
|
boolean |
onMessage(org.springframework.integration.Message<?> message)
Called by a TCPConnection when a new message arrives. |
void |
removeDeadConnection(TcpConnection connection)
When we are using sockets owned by a TcpListener, this
method is called each time a connection is closed. |
void |
retryConnection()
Immediately attempt to establish the connection. |
void |
setClientMode(boolean isClientMode)
|
void |
setConnectionFactory(AbstractConnectionFactory connectionFactory)
Must be AbstractClientConnectionFactory or AbstractServerConnectionFactory. |
void |
setRetryInterval(long retryInterval)
|
void |
setScheduler(org.springframework.scheduling.TaskScheduler scheduler)
Deprecated. Use AbstractEndpoint.setTaskScheduler(TaskScheduler) |
| Methods inherited from class org.springframework.integration.gateway.MessagingGatewaySupport |
|---|
receive, send, sendAndReceive, sendAndReceiveMessage, setErrorChannel, setReplyChannel, setReplyMapper, setReplyTimeout, setRequestChannel, setRequestMapper, setRequestTimeout, 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 TcpInboundGateway()
| Method Detail |
|---|
public boolean onMessage(org.springframework.integration.Message<?> message)
TcpListener
onMessage in interface TcpListenermessage - The message.
public boolean isListening()
public void setConnectionFactory(AbstractConnectionFactory connectionFactory)
AbstractClientConnectionFactory or AbstractServerConnectionFactory.
connectionFactory - the Connection Factorypublic void addNewConnection(TcpConnection connection)
TcpSenderTcpListener, this
method is called each time a new connection is made.
addNewConnection in interface TcpSenderconnection - The connection.public void removeDeadConnection(TcpConnection connection)
TcpSenderTcpListener, this
method is called each time a connection is closed.
removeDeadConnection in interface TcpSenderconnection - The connection.public java.lang.String getComponentType()
getComponentType in interface org.springframework.integration.context.NamedComponentgetComponentType in class org.springframework.integration.gateway.MessagingGatewaySupport
protected void onInit()
throws java.lang.Exception
onInit in class org.springframework.integration.gateway.MessagingGatewaySupportjava.lang.Exceptionprotected void doStart()
doStart in class org.springframework.integration.gateway.MessagingGatewaySupportprotected void doStop()
doStop in class org.springframework.integration.gateway.MessagingGatewaySupportpublic boolean isClientMode()
isClientMode in interface ClientModeCapablepublic void setClientMode(boolean isClientMode)
isClientMode - the isClientMode to set@Deprecated public void setScheduler(org.springframework.scheduling.TaskScheduler scheduler)
AbstractEndpoint.setTaskScheduler(TaskScheduler)
scheduler - the scheduler to setpublic long getRetryInterval()
public void setRetryInterval(long retryInterval)
retryInterval - the retryInterval to setpublic boolean isClientModeConnected()
isClientModeConnected in interface ClientModeCapablepublic void retryConnection()
ClientModeCapable
retryConnection in interface ClientModeCapablepublic int beforeShutdown()
beforeShutdown in interface org.springframework.integration.context.OrderlyShutdownCapablepublic int afterShutdown()
afterShutdown in interface org.springframework.integration.context.OrderlyShutdownCapable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||