|
|||||||||
| 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.TcpNetClientConnectionFactory
public class TcpNetClientConnectionFactory
A client connection factory that creates TcpNetConnections.
| Field Summary |
|---|
| Fields inherited from class org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory |
|---|
DEFAULT_REPLY_TIMEOUT, lifecycleMonitor, logger |
| Constructor Summary | |
|---|---|
TcpNetClientConnectionFactory(java.lang.String host,
int port)
Creates a TcpNetClientConnectionFactory for connections to the host and port. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the server. |
protected java.net.Socket |
createSocket(java.lang.String host,
int port)
Create a new Socket. |
TcpConnection |
getConnection()
Obtains a connection - if AbstractConnectionFactory.setSingleUse(boolean) was called with
true, a new connection is returned; otherwise a single connection is
reused for all requests while the connection remains open. |
void |
run()
|
| Methods inherited from class org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory |
|---|
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, harvestClosedConnections, isActive, isAutoStartup, isLookupHost, isRunning, isSingleUse, isSoKeepAlive, isSoTcpNoDelay, processNioSelections, registerListener, registerSender, setActive, setDeserializer, setInterceptorFactoryChain, setLookupHost, setMapper, setPoolSize, setSerializer, setSingleUse, setSocketAttributes, setSoKeepAlive, setSoLinger, setSoReceiveBufferSize, setSoSendBufferSize, setSoTcpNoDelay, setSoTimeout, setSoTrafficClass, setTaskExecutor, start, stop, stop, wrapConnection |
| Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
|---|
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getTaskScheduler, onInit, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.springframework.beans.factory.BeanNameAware |
|---|
setBeanName |
| Constructor Detail |
|---|
public TcpNetClientConnectionFactory(java.lang.String host,
int port)
host - the hostport - the port| Method Detail |
|---|
public TcpConnection getConnection()
throws java.lang.Exception
AbstractConnectionFactory.setSingleUse(boolean) was called with
true, a new connection is returned; otherwise a single connection is
reused for all requests while the connection remains open.
java.lang.Exception
protected java.net.Socket createSocket(java.lang.String host,
int port)
throws java.io.IOException
Socket. This default implementation uses the default
SocketFactory. Override to use some other mechanism
host - The host.port - The port.
java.io.IOExceptionpublic void close()
AbstractConnectionFactory
close in class AbstractConnectionFactorypublic void run()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||