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
Modifier and TypeMethodDescriptionvoid
Allows you to clear out all sessionsvoid
fireOnProxyContextCreated
(electric.glue.context.ProxyContext context) void
fireOnSessionCreated
(IWSClientSession session) getSession
(IWSClientProxy clientProxy) Given the current proxy, get or create a new session.getSessionPool
(IWSClientProxy clientProxy) getSessionPool
(IWSClientProxy clientProxy, String userAgent) void
invalidateSessionsForHost
(String hostURL) Invalidate any sessions for a specific host URL.void
registerListener
(IWSSessionListener sessionListener) Register a newIWSSessionListener
void
unregisterListener
(IWSSessionListener sessionListener) Unregister aIWSSessionListener
void
updateSessionPoolCredentials
(IWSClientProxy clientProxy, AuthCredentials oldAuthCred, AuthCredentials newAuthCred) Update a session pool in the Session Manager.
-
Method Details
-
getSessionPool
-
getSessionPool
- Parameters:
clientProxy
- theIWSClientProxy
proxy of the web service interface to invokeuserAgent
- Axis2 or Glue- Returns:
-
getSession
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
- theIWSClientProxy
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
- theIWSClientProxy
proxy of the web service interface to invokeoldAuthCred
- the originalAuthCredentials
to updatenewAuthCred
- the newAuthCredentials
for use by the session
-
registerListener
Register a newIWSSessionListener
- Parameters:
sessionListener
-
-
unregisterListener
Unregister aIWSSessionListener
- Parameters:
sessionListener
-
-
invalidateSessionsForHost
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(electric.glue.context.ProxyContext context) -
fireOnSessionCreated
-