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

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

public class WSClientSession
extends Object
implements IWSClientSession

Wraps a Proxy context for sessions


Field Summary
protected  boolean m_busy
           
protected  com.webmethods.caf.wsclient.session.impl.WSClientSession.CookieInterceptor m_cookieInterceptor
           
protected  boolean m_expired
           
 
Constructor Summary
WSClientSession(IWSClientSessionPool clientSessionPool, AuthCredentials authCredentials, String hostURL, String id)
          Create a new session instance.
 
Method Summary
 AuthCredentials getAuthCredentials()
          Get the AuthCredentials used by the session to authenicate web service requests.
 String getHostURL()
          Get the configured endPoint for this session (and ProxyContext)
 String getID()
          The unique ID that describes this session
 ProxyContext getProxyContext()
          Get the context created for this Session.
 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)
           
 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 setSessionCookies(ClientCookie[] sessionCookies)
          Set the session's client cookies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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 Detail

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 - the IWSClientSessionPool that manages this pool
authCredentials - the AuthCredentials used to authenticate this session with web service provider
hostURL - the web service endpoint URL as a string
id - the session ID to assign to this session
Method Detail

getID

public String getID()
Description copied from interface: IWSClientSession
The unique ID that describes this session

Specified by:
getID in interface IWSClientSession

getHostURL

public String getHostURL()
Description copied from interface: IWSClientSession
Get the configured endPoint for this session (and ProxyContext)

Specified by:
getHostURL in interface IWSClientSession
Returns:
the endpoint URL of the web service to invoke

getProxyContext

public 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 interface IWSClientSession

isExpired

public boolean isExpired()
Description copied from interface: IWSClientSession
Has this session been flagged for expiration

Specified by:
isExpired in interface IWSClientSession
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 interface IWSClientSession
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 interface IWSClientSession
Parameters:
newVal - true if the session is busy

setAuthCredentials

public void setAuthCredentials(AuthCredentials authCredentials)
Description copied from interface: IWSClientSession
Set the AuthCredentials of the session

Specified by:
setAuthCredentials in interface IWSClientSession

getAuthCredentials

public AuthCredentials getAuthCredentials()
Description copied from interface: IWSClientSession
Get the AuthCredentials used by the session to authenicate web service requests.

Specified by:
getAuthCredentials in interface IWSClientSession

setExpired

public void setExpired(boolean newVal)
Description copied from interface: IWSClientSession
Mark this session as expired

Specified by:
setExpired in interface IWSClientSession
Parameters:
newVal - true if this session is no longer valid

notEmptyString

public static boolean notEmptyString(String str)

getSessionCookies

public ClientCookie[] getSessionCookies()
Description copied from interface: IWSClientSession
Get any the ClientCookie[] associated with this session

Specified by:
getSessionCookies in interface IWSClientSession
Returns:
ClientCookie[] or null

setSessionCookies

public void setSessionCookies(ClientCookie[] sessionCookies)
Description copied from interface: IWSClientSession
Set the session's client cookies

Specified by:
setSessionCookies in interface IWSClientSession
Parameters:
sessionCookies - - an array of ClientCookie objects