com.webmethods.caf.wsclient.cache.impl
Class WSCacheKey

java.lang.Object
  extended by com.webmethods.caf.wsclient.cache.impl.WSCacheKey
All Implemented Interfaces:
IWSCacheKey

public class WSCacheKey
extends Object
implements IWSCacheKey

Default implementation of the IWSCacheKey interface Cache entry uniqueness is determined by


Constructor Summary
WSCacheKey(String sessionID, String method, ClassLoader classLoader, Object[] args)
          Construct a new WSCacheKey will all of the info needed to populate the key
 
Method Summary
 boolean equals(Object o)
          (non-Javadoc)
 Object[] getArgs()
          Get the array of web service method arguments used as part of the unique cache key
 ClassLoader getClassLoader()
          Get the web service interface classloader used as part of the unique cache key
 String getMethod()
          Get the web service method used as part of the unique cache key
 String getSessionId()
          Get the session ID of the current HTTP session with the web service endpoint, used as part of the unique cache key
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSCacheKey

public WSCacheKey(String sessionID,
                  String method,
                  ClassLoader classLoader,
                  Object[] args)
Construct a new WSCacheKey will all of the info needed to populate the key

Parameters:
sessionID - the session ID of the curren HTTP sessio, preventing caching collisions when a browser is multiple tabs open with the same sessionID
method - the name of the web service method to be invoked
classLoader - the classloader of the web service interface, preventing caching collisions when the same global WsClient instance is shared by multiple web applications.
args - the web service arguments
Method Detail

getMethod

public String getMethod()
Get the web service method used as part of the unique cache key

Returns:
the web service method name

getArgs

public Object[] getArgs()
Get the array of web service method arguments used as part of the unique cache key

Returns:
array of argument Objects

getClassLoader

public ClassLoader getClassLoader()
Get the web service interface classloader used as part of the unique cache key

Returns:
the web service interface's ClassLoader instance

getSessionId

public String getSessionId()
Get the session ID of the current HTTP session with the web service endpoint, used as part of the unique cache key

Returns:
the HTTP session ID

equals

public boolean equals(Object o)
(non-Javadoc)

Overrides:
equals in class Object
See Also:
java.lang.Object#equals()

hashCode

public int hashCode()
Overrides:
hashCode in class Object