|
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.ip.tcp.connection.AbstractConnectionFactory
org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory
org.springframework.integration.ip.tcp.connection.FailoverClientConnectionFactory
public class FailoverClientConnectionFactory
Given a list of connection factories, serves up TcpConnections
that can iterate over a connection from each factory until the write
succeeds or the list is exhausted.
| Field Summary |
|---|
| Fields inherited from class org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory |
|---|
DEFAULT_REPLY_TIMEOUT, lifecycleMonitor |
| Constructor Summary | |
|---|---|
FailoverClientConnectionFactory(java.util.List<AbstractClientConnectionFactory> factories)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the server. |
boolean |
isRunning()
Returns true if all factories are running |
protected TcpConnection |
obtainConnection()
|
protected void |
onInit()
Subclasses may implement this for initialization logic. |
void |
registerListener(TcpListener listener)
Delegate TCP Client Connection factories that are used to receive data need a Listener to send the messages to. |
void |
registerSender(TcpSender sender)
Registers a TcpSender; for server sockets, used to provide connection information so a sender can be used to reply to incoming messages. |
void |
start()
|
void |
stop()
Stops the server. |
| Methods inherited from class org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory |
|---|
forceClose, getConnection, getTheConnection, initializeConnection, setTheConnection |
| Methods inherited from class org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory |
|---|
addConnection, checkActive, doAccept, getDeserializer, getHost, getListener, getMapper, getPhase, getPoolSize, getPort, getSender, getSerializer, getSoLinger, getSoReceiveBufferSize, getSoSendBufferSize, getSoTimeout, getSoTrafficClass, getTaskExecutor, getTcpSocketSupport, harvestClosedConnections, isActive, isAutoStartup, isLookupHost, isSingleUse, isSoKeepAlive, isSoTcpNoDelay, processNioSelections, setActive, setDeserializer, setInterceptorFactoryChain, setLookupHost, setMapper, setNioHarvestInterval, setPoolSize, setSerializer, setSingleUse, setSocketAttributes, setSoKeepAlive, setSoLinger, setSoReceiveBufferSize, setSoSendBufferSize, setSoTcpNoDelay, setSoTimeout, setSoTrafficClass, setTaskExecutor, setTcpSocketSupport, stop, wrapConnection |
| Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FailoverClientConnectionFactory(java.util.List<AbstractClientConnectionFactory> factories)
| Method Detail |
|---|
protected void onInit()
throws java.lang.Exception
IntegrationObjectSupport
onInit in class IntegrationObjectSupportjava.lang.Exceptionpublic void registerListener(TcpListener listener)
registerListener in class AbstractConnectionFactorylistener - the TcpListener.public void registerSender(TcpSender sender)
AbstractConnectionFactory
registerSender in class AbstractConnectionFactorysender - The sender
protected TcpConnection obtainConnection()
throws java.lang.Exception
obtainConnection in class AbstractClientConnectionFactoryjava.lang.Exceptionpublic void close()
AbstractConnectionFactory
close in class AbstractConnectionFactorypublic void start()
start in interface org.springframework.context.Lifecyclestart in class AbstractConnectionFactorypublic void stop()
AbstractConnectionFactory
stop in interface org.springframework.context.Lifecyclestop in class AbstractConnectionFactorypublic boolean isRunning()
isRunning in interface org.springframework.context.LifecycleisRunning in class AbstractConnectionFactory
|
Spring Integration | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||