CodeBeamer 5.4.0.1-RC API

com.intland.codebeamer.remoting
Class RemoteApiProxy

java.lang.Object
  extended by com.intland.codebeamer.remoting.RemoteApiProxy
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class RemoteApiProxy
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

A special InvocationHandler around a HessianProxy for the RemoteApi to cache session specific information locally on the client


Constructor Summary
RemoteApiProxy(RemoteApi proxy)
          Create a new RemoteApiProxy wrapper for the Hessian RemoteApi proxy provided
 
Method Summary
protected  RemoteSession checkSession(java.lang.String token)
           
protected  void closeSession(java.lang.String token)
           
 boolean equals(java.lang.Object obj)
           
protected  void finalize()
           
 ServerInfo getServerInfo()
          Returns general information about the remote server.
 RemoteSession getSession(java.lang.Object token)
          Get the RemoteSession with the specified token
 java.util.Map<java.lang.String,RemoteSession> getSessions()
          Get the active RemoteSessions of this proxy
 java.net.URL getURL()
          Returns the proxy's target URL.
 int hashCode()
           
protected  void initSession(java.lang.String token)
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          Handles the object invocation.
static java.lang.String Throwable2Status(java.lang.Throwable ex)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteApiProxy

public RemoteApiProxy(RemoteApi proxy)
Create a new RemoteApiProxy wrapper for the Hessian RemoteApi proxy provided

Parameters:
proxy - is the RemoteApi proxy to wrap
Throws:
java.lang.IllegalArgumentException - if the proxy is not a Proxy connected to a HessianProxy handler
Method Detail

getURL

public java.net.URL getURL()
Returns the proxy's target URL.


getServerInfo

public ServerInfo getServerInfo()
Returns general information about the remote server.


getSessions

public java.util.Map<java.lang.String,RemoteSession> getSessions()
Get the active RemoteSessions of this proxy

Returns:
the RemoteSession or null if not logged in

getSession

public RemoteSession getSession(java.lang.Object token)
Get the RemoteSession with the specified token

Parameters:
token - is the RemoteSession identifier token
Returns:
the RemoteSession with the specified token, or null if not known

initSession

protected void initSession(java.lang.String token)

checkSession

protected RemoteSession checkSession(java.lang.String token)

closeSession

protected void closeSession(java.lang.String token)

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Handles the object invocation.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Parameters:
proxy - the proxy that calls invoke
method - the target method to call
args - the arguments to the proxy object
Throws:
java.lang.Throwable

Throwable2Status

public static java.lang.String Throwable2Status(java.lang.Throwable ex)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

CodeBeamer 5.4.0.1-RC API

Copyright © 2006-2009 Intland Software. All rights reserved.