com.webmethods.caf.wsclient.session.impl
Class WSClientSessionPool

java.lang.Object
  extended by com.webmethods.caf.wsclient.session.impl.WSClientSessionPool
All Implemented Interfaces:
IWSClientSessionPool

public class WSClientSessionPool
extends Object
implements IWSClientSessionPool

Default implementation of the IWSClientSessionPool interface


Constructor Summary
WSClientSessionPool(IWSClientSessionManager sessionMgr, AuthCredentials authCred)
          Construct a new session pool
 
Method Summary
 IWSClientSession createSession(IWSClientProxy clientProxy)
           
 AuthCredentials getAuthCredentials()
           
 String getHostURL()
          Get the target hostURL for this session pool NOTE: used for quick lookup of session pools that need to be invalidated if the web service endpoint beings throwing transport/connection errors
protected  IWSClientSession getNextAvailableSession(IWSClientProxy clientProxy)
           
 IWSClientSession getSession(IWSClientProxy clientProxy)
           
 IWSClientSessionManager getSessionManager()
           
 List getSessions()
           
 void releaseSession(IWSClientSession session)
           
 void reset()
           
 void setAuthCredentials(AuthCredentials credentials)
           
 void setSessionManager(IWSClientSessionManager sessionManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSClientSessionPool

public WSClientSessionPool(IWSClientSessionManager sessionMgr,
                           AuthCredentials authCred)
Construct a new session pool

Parameters:
sessionMgr - the IWSClientSessionManager that will manage this session pool
authCred - the AuthCredentials to be used to authenticate sessions managed by this pool
Method Detail

getSession

public IWSClientSession getSession(IWSClientProxy clientProxy)
Specified by:
getSession in interface IWSClientSessionPool

releaseSession

public void releaseSession(IWSClientSession session)
Specified by:
releaseSession in interface IWSClientSessionPool

getNextAvailableSession

protected IWSClientSession getNextAvailableSession(IWSClientProxy clientProxy)

createSession

public IWSClientSession createSession(IWSClientProxy clientProxy)
Specified by:
createSession in interface IWSClientSessionPool

getAuthCredentials

public AuthCredentials getAuthCredentials()
Specified by:
getAuthCredentials in interface IWSClientSessionPool

setAuthCredentials

public void setAuthCredentials(AuthCredentials credentials)
Specified by:
setAuthCredentials in interface IWSClientSessionPool

getSessions

public List getSessions()
Specified by:
getSessions in interface IWSClientSessionPool

getSessionManager

public IWSClientSessionManager getSessionManager()
Specified by:
getSessionManager in interface IWSClientSessionPool

setSessionManager

public void setSessionManager(IWSClientSessionManager sessionManager)
Specified by:
setSessionManager in interface IWSClientSessionPool

getHostURL

public String getHostURL()
Description copied from interface: IWSClientSessionPool
Get the target hostURL for this session pool NOTE: used for quick lookup of session pools that need to be invalidated if the web service endpoint beings throwing transport/connection errors

Specified by:
getHostURL in interface IWSClientSessionPool
Returns:
the host URL that sessions in this pool are connecting to

reset

public void reset()
Specified by:
reset in interface IWSClientSessionPool