org.gridforum.gridrpc
Interface GrpcClient

All Known Implementing Classes:
NgGrpcClient

public interface GrpcClient

This interface provides functions to initialize, finalize and get/set methods for GridRPC.
It keeps information(servers, functions...) for GridRPC, And has functions for process of GridRPC.
Use GrpcClientFactory.getClient(java.lang.String) to create object which implements this interface.


Method Summary
 void activate(java.util.Properties prop)
          Initialize GrpcClient with Properties object which contains information for server.
 void activate(java.lang.String configFilename)
          Initialize GrpcClient with a name of configuration file.
 void deactivate()
          Finalize GrpcClient.
 GrpcFunctionHandle getFunctionHandle(java.lang.String functionName)
          Create GrpcFunctionHandle without server information.
Default server(it depends on implementation) will be used.
 GrpcFunctionHandle getFunctionHandle(java.lang.String functionName, java.util.Properties prop)
          Create GrpcFunctionHandle for the specified function on the server.
 GrpcFunctionHandle[] getFunctionHandles(java.lang.String functionName, int nHandles)
          Create GrpcFunctionHandle without server information.
Default server(it depends on implementation) will be used.
 GrpcFunctionHandle[] getFunctionHandles(java.lang.String functionName, java.util.Properties prop, int nHandles)
          Create specified number of GrpcFunctionHandle for the specified function on the server.
 GrpcObjectHandle getObjectHandle(java.lang.String objectName)
          Create GrpcObjectHandle without server information.
Default server(it depends on implementation) will be used.
 GrpcObjectHandle getObjectHandle(java.lang.String objectName, java.util.Properties prop)
          Create GrpcObjectHandle for the specified object on the server.
 GrpcObjectHandle[] getObjectHandles(java.lang.String objectName, int nHandles)
          Create GrpcObjectHandle without server information.
Default server(it depends on implementation) will be used.
 GrpcObjectHandle[] getObjectHandles(java.lang.String objectName, java.util.Properties prop, int nHandles)
          Create specified number of GrpcObjectHandle for the specified function on the server.
 

Method Detail

activate

public void activate(java.lang.String configFilename)
              throws GrpcException
Initialize GrpcClient with a name of configuration file.

Parameters:
configFilename - a name of configuration file.
Throws:
GrpcException - it it failed to initialize.

activate

public void activate(java.util.Properties prop)
              throws GrpcException
Initialize GrpcClient with Properties object which contains information for server.

Parameters:
prop - information of server.
Throws:
GrpcException - if it failed to initialize.

getFunctionHandle

public GrpcFunctionHandle getFunctionHandle(java.lang.String functionName,
                                            java.util.Properties prop)
                                     throws GrpcException
Create GrpcFunctionHandle for the specified function on the server.

Parameters:
functionName - a name of function.
prop - information of server.
Returns:
GrpcFunctionHandle.
Throws:
GrpcException - if it failed to create FunctionHandle.

getFunctionHandle

public GrpcFunctionHandle getFunctionHandle(java.lang.String functionName)
                                     throws GrpcException
Create GrpcFunctionHandle without server information.
Default server(it depends on implementation) will be used.

Parameters:
functionName - a name of function.
Returns:
GrpcFunctionHandle.
Throws:
GrpcException - if it failed to create FunctionHandle.

getFunctionHandles

public GrpcFunctionHandle[] getFunctionHandles(java.lang.String functionName,
                                               java.util.Properties prop,
                                               int nHandles)
                                        throws GrpcException
Create specified number of GrpcFunctionHandle for the specified function on the server.

Parameters:
functionName - a name of function.
prop - information of server.
nHandles - a number of FunctionHandle.
Returns:
a list of GrpcFunctionHandle.
Throws:
GrpcException - if it failed to create FunctionHandle.

getFunctionHandles

public GrpcFunctionHandle[] getFunctionHandles(java.lang.String functionName,
                                               int nHandles)
                                        throws GrpcException
Create GrpcFunctionHandle without server information.
Default server(it depends on implementation) will be used.

Parameters:
functionName - a name of function.
nHandles - a number of FunctionHandle.
Returns:
a list of GrpcFunctionHandle.
Throws:
GrpcException - if it failed to create FunctionHandle.

getObjectHandle

public GrpcObjectHandle getObjectHandle(java.lang.String objectName,
                                        java.util.Properties prop)
                                 throws GrpcException
Create GrpcObjectHandle for the specified object on the server.

Parameters:
objectName - a name of object.
prop - information of server.
Returns:
GrpcObjectHandle.
Throws:
GrpcException - if it failed to create ObjectHandle.

getObjectHandle

public GrpcObjectHandle getObjectHandle(java.lang.String objectName)
                                 throws GrpcException
Create GrpcObjectHandle without server information.
Default server(it depends on implementation) will be used.

Parameters:
objectName - a name of object.
Returns:
GrpcObjectHandle.
Throws:
GrpcException - if it failed to create ObjectHandle.

getObjectHandles

public GrpcObjectHandle[] getObjectHandles(java.lang.String objectName,
                                           java.util.Properties prop,
                                           int nHandles)
                                    throws GrpcException
Create specified number of GrpcObjectHandle for the specified function on the server.

Parameters:
objectName - a name of object.
prop - information of server.
nHandles - a number of FunctionHandle.
Returns:
a list of GrpcObjectHandle.
Throws:
GrpcException - if it failed to create ObjectHandle.

getObjectHandles

public GrpcObjectHandle[] getObjectHandles(java.lang.String objectName,
                                           int nHandles)
                                    throws GrpcException
Create GrpcObjectHandle without server information.
Default server(it depends on implementation) will be used.

Parameters:
objectName - a name of object.
nHandles - a number of FunctionHandle.
Returns:
a list of GrpcObjectHandle.
Throws:
GrpcException - if it failed to create ObjectHandle.

deactivate

public void deactivate()
                throws GrpcException
Finalize GrpcClient.

Throws:
GrpcException - if it failed to finalize.