public class WSClientSession extends Object implements IWSClientSession
Modifier and Type | Field and Description |
---|---|
protected boolean |
m_busy |
protected com.webmethods.caf.wsclient.session.impl.WSClientSession.CookieInterceptor |
m_cookieInterceptor |
protected boolean |
m_expired |
Constructor and Description |
---|
WSClientSession(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.
|
Modifier and Type | Method and Description |
---|---|
AuthCredentials |
getAuthCredentials()
Get the
AuthCredentials used by the session to authenicate web service requests. |
electric.util.Context |
getContext() |
String |
getHostURL()
Get the configured endPoint for this session (and ProxyContext)
|
String |
getID()
The unique ID that describes this session
|
electric.glue.context.ProxyContext |
getProxyContext()
Get the context created for this Session.
|
Map<String,String> |
getSessionCookieMap()
Retirve the session cookies as a map
|
electric.http.cookies.ClientCookie[] |
getSessionCookies()
Get any the ClientCookie[] associated with this session
|
boolean |
isBusy()
Is this session currently servicing a web service request
|
boolean |
isExpired()
Has this session been flagged for expiration
|
static boolean |
notEmptyString(String str)
Deprecated.
|
void |
setAuthCredentials(AuthCredentials authCredentials)
Set the AuthCredentials of the session
|
void |
setBusy(boolean newVal)
Mark this session as busy and not available to handle another request
|
void |
setExpired(boolean newVal)
Mark this session as expired
|
void |
setSessionCookieMap(Map<String,String> cookies)
set the cookies
|
void |
setSessionCookies(electric.http.cookies.ClientCookie[] sessionCookies)
Set the session's client cookies
|
protected boolean m_expired
protected boolean m_busy
protected com.webmethods.caf.wsclient.session.impl.WSClientSession.CookieInterceptor m_cookieInterceptor
public WSClientSession(IWSClientSessionPool clientSessionPool, AuthCredentials authCredentials, String hostURL, String id)
clientSessionPool
- the IWSClientSessionPool
that manages this poolauthCredentials
- the AuthCredentials
used to authenticate this session with web service providerhostURL
- the web service endpoint URL as a stringid
- the session ID to assign to this sessionpublic WSClientSession(IWSClientSessionPool clientSessionPool, AuthCredentials authCredentials, String hostURL, String id, boolean pooledSession)
clientSessionPool
- the IWSClientSessionPool
that manages this poolauthCredentials
- the AuthCredentials
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 poolpublic String getID()
IWSClientSession
getID
in interface IWSClientSession
public String getHostURL()
IWSClientSession
getHostURL
in interface IWSClientSession
public electric.glue.context.ProxyContext getProxyContext()
IWSClientSession
getProxyContext
in interface IWSClientSession
public boolean isExpired()
IWSClientSession
isExpired
in interface IWSClientSession
public boolean isBusy()
IWSClientSession
isBusy
in interface IWSClientSession
public void setBusy(boolean newVal)
IWSClientSession
setBusy
in interface IWSClientSession
newVal
- true if the session is busypublic void setAuthCredentials(AuthCredentials authCredentials)
IWSClientSession
setAuthCredentials
in interface IWSClientSession
public AuthCredentials getAuthCredentials()
IWSClientSession
AuthCredentials
used by the session to authenicate web service requests.getAuthCredentials
in interface IWSClientSession
public void setExpired(boolean newVal)
IWSClientSession
setExpired
in interface IWSClientSession
newVal
- true if this session is no longer valid@Deprecated public static boolean notEmptyString(String str)
public electric.http.cookies.ClientCookie[] getSessionCookies()
IWSClientSession
getSessionCookies
in interface IWSClientSession
public void setSessionCookies(electric.http.cookies.ClientCookie[] sessionCookies)
IWSClientSession
setSessionCookies
in interface IWSClientSession
sessionCookies
- - an array of ClientCookie objectspublic void setSessionCookieMap(Map<String,String> cookies)
IWSClientSession
setSessionCookieMap
in interface IWSClientSession
cookies
- as a map of stringspublic Map<String,String> getSessionCookieMap()
IWSClientSession
getSessionCookieMap
in interface IWSClientSession
public electric.util.Context getContext()