org.gridforum.gridrpc
Class GrpcFunctionHandle

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

public abstract class GrpcFunctionHandle
extends java.lang.Object

Provides interfaces to control RemoteFunctions.
This class keeps information about a server and a RemoteFunction, can call a RemoteFunction with arguments and receive a result of it.
If an error occurred in this class, then it will be notified by throwing GrpcException.


Constructor Summary
GrpcFunctionHandle()
           
 
Method Summary
 GrpcExecInfo call()
          Calls a RemoteFunction without any arguments.
 GrpcExecInfo call(java.lang.Object... args)
          Calls a RemoteFunction with a specified argument.
 GrpcExecInfo call(java.util.Properties sessionAttr)
          Calls a RemoteFunction with attributes and no arguments.
 GrpcExecInfo call(java.util.Properties sessionAttr, java.lang.Object... args)
          Calls a RemoteFunction with attributes and a specified argument.
abstract  GrpcExecInfo callWith(java.util.Properties sessionAttr, java.util.List args)
          Calls a RemoteFunction with specified arguments.
abstract  void cancel()
          Cancels a current session.
abstract  void dispose()
          Disposes this handle.
This method must be called when you don't need this handle any more.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrpcFunctionHandle

public GrpcFunctionHandle()
Method Detail

callWith

public abstract GrpcExecInfo callWith(java.util.Properties sessionAttr,
                                      java.util.List args)
                               throws GrpcException
Calls a RemoteFunction with specified arguments.

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

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
Disposes this handle.
This method must be called when you don't need this handle any more.

Throws:
GrpcException - if it failed to dispose.

call

public GrpcExecInfo call()
                  throws GrpcException
Calls a RemoteFunction without any arguments.

Returns:
GrpcExecInfo
Throws:
GrpcException - if it failed to call a RemoteFunction.

call

public GrpcExecInfo call(java.lang.Object... args)
                  throws GrpcException
Calls a RemoteFunction with a specified argument.

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

call

public GrpcExecInfo call(java.util.Properties sessionAttr)
                  throws GrpcException
Calls a RemoteFunction with attributes and no arguments.

Parameters:
sessionAttr - attributes for the session
Returns:
GrpcExecInfo
Throws:
GrpcException - if it failed to call a RemoteFunction.

call

public GrpcExecInfo call(java.util.Properties sessionAttr,
                         java.lang.Object... args)
                  throws GrpcException
Calls a RemoteFunction with attributes and a specified argument.

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