org.apache.servicemix.ftp
Class SocketClientPoolSupport
java.lang.Object
org.apache.servicemix.ftp.SocketClientPoolSupport
- All Implemented Interfaces:
- org.apache.commons.pool.PoolableObjectFactory, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
- FTPClientPool
public abstract class SocketClientPoolSupport
- extends Object
- implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.apache.commons.pool.PoolableObjectFactory
A pool of SocketClient instances from the
Jakarta Commons Net library to handle
internet networking connections.
- Version:
- $Revision: 426415 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SocketClientPoolSupport
public SocketClientPoolSupport()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
Exception
destroy
public void destroy()
throws Exception
- Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
- Throws:
Exception
borrowClient
public org.apache.commons.net.SocketClient borrowClient()
throws Exception
- Throws:
Exception
returnClient
public void returnClient(org.apache.commons.net.SocketClient client)
throws Exception
- Throws:
Exception
makeObject
public Object makeObject()
throws Exception
- Specified by:
makeObject in interface org.apache.commons.pool.PoolableObjectFactory
- Throws:
Exception
destroyObject
public void destroyObject(Object object)
throws Exception
- Specified by:
destroyObject in interface org.apache.commons.pool.PoolableObjectFactory
- Throws:
Exception
validateObject
public boolean validateObject(Object object)
- Specified by:
validateObject in interface org.apache.commons.pool.PoolableObjectFactory
activateObject
public void activateObject(Object object)
throws Exception
- Specified by:
activateObject in interface org.apache.commons.pool.PoolableObjectFactory
- Throws:
Exception
passivateObject
public void passivateObject(Object object)
throws Exception
- Specified by:
passivateObject in interface org.apache.commons.pool.PoolableObjectFactory
- Throws:
Exception
getAddress
public InetAddress getAddress()
setAddress
public void setAddress(InetAddress address)
getHost
public String getHost()
setHost
public void setHost(String host)
getLocalAddress
public InetAddress getLocalAddress()
setLocalAddress
public void setLocalAddress(InetAddress localAddress)
getLocalPort
public int getLocalPort()
setLocalPort
public void setLocalPort(int localPort)
getPort
public int getPort()
setPort
public void setPort(int port)
getPool
public org.apache.commons.pool.ObjectPool getPool()
setPool
public void setPool(org.apache.commons.pool.ObjectPool pool)
connect
protected void connect(org.apache.commons.net.SocketClient client)
throws IOException,
javax.jbi.JBIException,
Exception
- Throws:
IOException
javax.jbi.JBIException
Exception
disconnect
protected void disconnect(org.apache.commons.net.SocketClient client)
throws Exception
- Throws:
Exception
createSocketClient
protected abstract org.apache.commons.net.SocketClient createSocketClient()
Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.