org.gridforum.gridrpc
Class GrpcObjectHandle

java.lang.Object
  extended by org.gridforum.gridrpc.GrpcObjectHandle

public abstract class GrpcObjectHandle
extends java.lang.Object

Provides interfaces to control RemoteObjects.
This class keeps information about a server and a RemoteObject, can call a RemoteObject with arguments and receive a result of it.
RemoteObjects have several methods, so you have to specify which method to call.
If an error occurred in this class, then it will be notified by throwing GrpcException.


Constructor Summary
GrpcObjectHandle()
           
 
Method Summary
abstract  void cancel()
          Cancels a current session.
abstract  void dispose()
          Dispose this handle.
This method must be called when you don't need this handle any more.
 GrpcExecInfo invoke(java.lang.String methodName)
          Calls a RemoteMethod without any arguments.
 GrpcExecInfo invoke(java.lang.String methodName, java.lang.Object... args)
          Calls a RemoteMethod with a specified argument.
 GrpcExecInfo invoke(java.lang.String methodName, java.util.Properties sessionAttr)
          Calls a RemoteMethod with attributes and no arguments.
 GrpcExecInfo invoke(java.lang.String methodName, java.util.Properties sessionAttr, java.lang.Object... args)
          Calls a RemoteMethod with attributes and a specified argument.
abstract  GrpcExecInfo invokeWith(java.lang.String methodName, java.util.Properties sessionAttr, java.util.List args)
          Calls a RemoteMethod with specified arguments.
You have to specify a name of method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrpcObjectHandle

public GrpcObjectHandle()
Method Detail

invokeWith

public abstract GrpcExecInfo invokeWith(java.lang.String methodName,
                                        java.util.Properties sessionAttr,
                                        java.util.List args)
                                 throws GrpcException
Calls a RemoteMethod with specified arguments.
You have to specify a name of method.

Parameters:
args - List of arguments for a RemoteMethod.
Returns:
GrpcExecInfo
Throws:
GrpcException - if it failed to call a RemoteMethod.

cancel

public abstract void cancel()
                     throws GrpcException
Cancels a current session.

Throws:
GrpcException - if it failed to cancel.

dispose

public abstract void dispose()
                      throws GrpcException
Dispose this handle.
This method must be called when you don't need this handle any more.

Throws:
GrpcException - if it failed to dispose.

invoke

public GrpcExecInfo invoke(java.lang.String methodName)
                    throws GrpcException
Calls a RemoteMethod without any arguments.

Parameters:
methodName - a name of a RemoteMethod.
Returns:
GrpcExecInfo
Throws:
GrpcException - if it failed to call a RemoteMethod.

invoke

public GrpcExecInfo invoke(java.lang.String methodName,
                           java.lang.Object... args)
                    throws GrpcException
Calls a RemoteMethod with a specified argument.

Parameters:
methodName - a name of a RemoteMethod.
args - arguments for a RemoteMethod.
Returns:
GrpcExecInfo
Throws:
GrpcException - if it failed to call a RemoteMethod.

invoke

public GrpcExecInfo invoke(java.lang.String methodName,
                           java.util.Properties sessionAttr)
                    throws GrpcException
Calls a RemoteMethod with attributes and no arguments.

Parameters:
methodName - a name of a RemoteMethod.
sessionAttr - attributes for the session
Returns:
GrpcExecInfo
Throws:
GrpcException - if it failed to call a RemoteMethod.

invoke

public GrpcExecInfo invoke(java.lang.String methodName,
                           java.util.Properties sessionAttr,
                           java.lang.Object... args)
                    throws GrpcException
Calls a RemoteMethod with attributes and a specified argument.

Parameters:
methodName - a name of a RemoteMethod.
sessionAttr - attributes for the session
args - arguments for a RemoteMethod.
Returns:
GrpcExecInfo
Throws:
GrpcException - if it failed to call a RemoteMethod.