com.webmethods.caf.wsclient.session
Interface IWSClientSessionManager

All Known Implementing Classes:
WSClientSessionManager

public interface IWSClientSessionManager

Interface defining the session management for the WsClient Library This allows you to reuse previously (authenticated) http sessions from prior web service invocations


Method Summary
 void clearAllSessions()
          Allows you to clear out all sessions
 void fireOnProxyContextCreated(ProxyContext context)
           
 void fireOnSessionCreated(IWSClientSession session)
           
 IWSClientSession getSession(IWSClientProxy clientProxy)
          Given the current proxy, get or create a new session.
 IWSClientSessionPool getSessionPool(IWSClientProxy clientProxy)
           
 void invalidateSessionsForHost(String hostURL)
          Invalidate any sessions for a specific host URL.
 void registerListener(IWSSessionListener sessionListener)
          Register a new IWSSessionListener
 void unregisterListener(IWSSessionListener sessionListener)
          Unregister a IWSSessionListener
 void updateSessionPoolCredentials(IWSClientProxy clientProxy, AuthCredentials oldAuthCred, AuthCredentials newAuthCred)
          Update a session pool in the Session Manager.
 

Method Detail

getSessionPool

IWSClientSessionPool getSessionPool(IWSClientProxy clientProxy)

getSession

IWSClientSession getSession(IWSClientProxy clientProxy)
Given the current proxy, get or create a new session. This is an alternate mechanism that directly gets the session without retrieving an intermediate session pool object

Parameters:
clientProxy - the IWSClientProxy proxy of the web service interface to invoke
Returns:
the IWSClientSession object associated with this proxy

updateSessionPoolCredentials

void updateSessionPoolCredentials(IWSClientProxy clientProxy,
                                  AuthCredentials oldAuthCred,
                                  AuthCredentials newAuthCred)
Update a session pool in the Session Manager. This method may be necessary when the ClientProxy associated with the session has updated it's AuthCredentials, as this info is used to uniquely identify the proxy when doing a session pool lookup

Parameters:
clientProxy - the IWSClientProxy proxy of the web service interface to invoke
oldAuthCred - the original AuthCredentials to update
newAuthCred - the new AuthCredentials for use by the session

registerListener

void registerListener(IWSSessionListener sessionListener)
Register a new IWSSessionListener

Parameters:
sessionListener -

unregisterListener

void unregisterListener(IWSSessionListener sessionListener)
Unregister a IWSSessionListener

Parameters:
sessionListener -

invalidateSessionsForHost

void invalidateSessionsForHost(String hostURL)
Invalidate any sessions for a specific host URL. NOTE: the default implementation calls this method when a transport level exception occurs with a web service invocation. This is to prevent further invocation failures when an existing session is later used on a sticky-session load balancer.

Parameters:
hostURL -

clearAllSessions

void clearAllSessions()
Allows you to clear out all sessions


fireOnProxyContextCreated

void fireOnProxyContextCreated(ProxyContext context)

fireOnSessionCreated

void fireOnSessionCreated(IWSClientSession session)