Class WSClientSession
java.lang.Object
com.webmethods.caf.wsclient.session.impl.WSClientSession
- All Implemented Interfaces:
IWSClientSession
Wraps a Proxy context for sessions
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected com.webmethods.caf.wsclient.session.impl.WSClientSession.CookieInterceptor
protected boolean
-
Constructor Summary
ConstructorsConstructorDescriptionWSClientSession
(IWSClientSessionPool clientSessionPool, AuthCredentials authCredentials, String hostURL, String id) Create a new session instance.WSClientSession
(IWSClientSessionPool clientSessionPool, AuthCredentials authCredentials, String hostURL, String id, boolean pooledSession) Create a new session instance. -
Method Summary
Modifier and TypeMethodDescriptionGet theAuthCredentials
used by the session to authenicate web service requests.electric.util.Context
Get the configured endPoint for this session (and ProxyContext)getID()
The unique ID that describes this sessionelectric.glue.context.ProxyContext
Get the context created for this Session.Retirve the session cookies as a mapelectric.http.cookies.ClientCookie[]
Get any the ClientCookie[] associated with this sessionboolean
isBusy()
Is this session currently servicing a web service requestboolean
Has this session been flagged for expirationstatic boolean
notEmptyString
(String str) Deprecated.void
setAuthCredentials
(AuthCredentials authCredentials) Set the AuthCredentials of the sessionvoid
setBusy
(boolean newVal) Mark this session as busy and not available to handle another requestvoid
setExpired
(boolean newVal) Mark this session as expiredvoid
setSessionCookieMap
(Map<String, String> cookies) set the cookiesvoid
setSessionCookies
(electric.http.cookies.ClientCookie[] sessionCookies) Set the session's client cookies
-
Field Details
-
m_expired
protected boolean m_expired -
m_busy
protected boolean m_busy -
m_cookieInterceptor
protected com.webmethods.caf.wsclient.session.impl.WSClientSession.CookieInterceptor m_cookieInterceptor
-
-
Constructor Details
-
WSClientSession
public WSClientSession(IWSClientSessionPool clientSessionPool, AuthCredentials authCredentials, String hostURL, String id) Create a new session instance. This constructor is not commonly used, as sessions are usually constructed by a (@see IWSClientSessionPool.createSession())- Parameters:
clientSessionPool
- theIWSClientSessionPool
that manages this poolauthCredentials
- theAuthCredentials
used to authenticate this session with web service providerhostURL
- the web service endpoint URL as a stringid
- the session ID to assign to this session
-
WSClientSession
public WSClientSession(IWSClientSessionPool clientSessionPool, AuthCredentials authCredentials, String hostURL, String id, boolean pooledSession) Create a new session instance. This constructor is not commonly used, as sessions are usually constructed by a (@see IWSClientSessionPool.createSession())- Parameters:
clientSessionPool
- theIWSClientSessionPool
that manages this poolauthCredentials
- theAuthCredentials
used to authenticate this session with web service providerhostURL
- the web service endpoint URL as a stringid
- the session ID to assign to this sessionpooledSession
- whether this is a pooled session, if true any cookies returned by the call will subsequently used by other sessions sharing that pool
-
-
Method Details
-
getID
Description copied from interface:IWSClientSession
The unique ID that describes this session- Specified by:
getID
in interfaceIWSClientSession
-
getHostURL
Description copied from interface:IWSClientSession
Get the configured endPoint for this session (and ProxyContext)- Specified by:
getHostURL
in interfaceIWSClientSession
- Returns:
- the endpoint URL of the web service to invoke
-
getProxyContext
public electric.glue.context.ProxyContext getProxyContext()Description copied from interface:IWSClientSession
Get the context created for this Session. Every time this is called, it will create a new proxy context- Specified by:
getProxyContext
in interfaceIWSClientSession
-
isExpired
public boolean isExpired()Description copied from interface:IWSClientSession
Has this session been flagged for expiration- Specified by:
isExpired
in interfaceIWSClientSession
- Returns:
- true if the session has expired
-
isBusy
public boolean isBusy()Description copied from interface:IWSClientSession
Is this session currently servicing a web service request- Specified by:
isBusy
in interfaceIWSClientSession
- Returns:
- true if the session is busy and is not available to handle another request
-
setBusy
public void setBusy(boolean newVal) Description copied from interface:IWSClientSession
Mark this session as busy and not available to handle another request- Specified by:
setBusy
in interfaceIWSClientSession
- Parameters:
newVal
- true if the session is busy
-
setAuthCredentials
Description copied from interface:IWSClientSession
Set the AuthCredentials of the session- Specified by:
setAuthCredentials
in interfaceIWSClientSession
-
getAuthCredentials
Description copied from interface:IWSClientSession
Get theAuthCredentials
used by the session to authenicate web service requests.- Specified by:
getAuthCredentials
in interfaceIWSClientSession
-
setExpired
public void setExpired(boolean newVal) Description copied from interface:IWSClientSession
Mark this session as expired- Specified by:
setExpired
in interfaceIWSClientSession
- Parameters:
newVal
- true if this session is no longer valid
-
notEmptyString
Deprecated. -
getSessionCookies
public electric.http.cookies.ClientCookie[] getSessionCookies()Description copied from interface:IWSClientSession
Get any the ClientCookie[] associated with this session- Specified by:
getSessionCookies
in interfaceIWSClientSession
- Returns:
- ClientCookie[] or null
-
setSessionCookies
public void setSessionCookies(electric.http.cookies.ClientCookie[] sessionCookies) Description copied from interface:IWSClientSession
Set the session's client cookies- Specified by:
setSessionCookies
in interfaceIWSClientSession
- Parameters:
sessionCookies
- - an array of ClientCookie objects
-
setSessionCookieMap
Description copied from interface:IWSClientSession
set the cookies- Specified by:
setSessionCookieMap
in interfaceIWSClientSession
- Parameters:
cookies
- as a map of strings
-
getSessionCookieMap
Description copied from interface:IWSClientSession
Retirve the session cookies as a map- Specified by:
getSessionCookieMap
in interfaceIWSClientSession
- Returns:
- map of cookies
-
getContext
public electric.util.Context getContext()
-