|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apgrid.grpc.ng.NgGrpcClient
Ninf-G implementation of GrpcClient interface.
Provides functions defined in standard interfaces
and also provides Ninf-G special functions.
Constructor Summary | |
NgGrpcClient()
Creates NgGrpcClient object. |
Method Summary | |
void |
activate(java.util.Properties prop)
Initialize with Properties object which contains information for server. If "user.configFile" SystemProperty was set, use it as configuration file. If it's not set, then use Properties as information of the server. |
void |
activate(java.lang.String configFilename)
Initialize with a name of configuration file. If configFilename was null, "user.configFile" SystemProperty is used as configuration file. |
void |
deactivate()
Finalize GrpcClient. |
GrpcFunctionHandle |
getFunctionHandle(int executableID)
Gets GrpcFunctionHandle object which associated by executableID. |
GrpcFunctionHandle |
getFunctionHandle(java.lang.String functionName)
Creates GrpcFunctionHandle without server information.The server which described at the 1st < SERVER > section in a configuration file will be used. |
GrpcFunctionHandle |
getFunctionHandle(java.lang.String functionName,
java.util.Properties prop)
Creates GrpcFunctionHandle
for the specified function on the server.Use prop argument to set attribute variables of the server. Use strings defined in NgGrpcHandleAttr as key strings. |
GrpcFunctionHandle[] |
getFunctionHandles(java.lang.String functionName,
int nHandles)
Create specified number of GrpcFunctionHandle
without server information.The server which described at the 1st < SERVER > section in a configuration file will be used. |
GrpcFunctionHandle[] |
getFunctionHandles(java.lang.String functionName,
java.util.Properties prop,
int nHandles)
Creates specified number of GrpcFunctionHandle
for the specified function on the server.Use prop argument to set attribute variables of the server. Use strings defined in NgGrpcHandleAttr as key strings. |
java.lang.Object |
getHandle(int executableID)
Gets GrpcFunctionHandle or GrpcObjectHandle object which associated with executableID. |
int |
getID()
Gets ID of this NgGrpcClient. |
GrpcObjectHandle |
getObjectHandle(int executableID)
Gets GrpcObjectHandle object which associated by executableID. |
GrpcObjectHandle |
getObjectHandle(java.lang.String objectName)
Creates GrpcObjectHandle without server information.The server which described at the 1st < SERVER > section in a configuration file will be used. |
GrpcObjectHandle |
getObjectHandle(java.lang.String objectName,
java.util.Properties prop)
Creates GrpcObjectHandle
for the specified object on the server.Use prop argument to set attribute variables of the server. Use strings defined in NgGrpcHandleAttr as key strings. |
GrpcObjectHandle[] |
getObjectHandles(java.lang.String objectName,
int nHandles)
Creates specified number of GrpcObjectHandle
without server information.The server which described at the 1st < SERVER > section in a configuration file will be used. |
GrpcObjectHandle[] |
getObjectHandles(java.lang.String objectName,
java.util.Properties prop,
int nHandles)
Creates specified number of GrpcObjectHandle
for the specified function on the server. |
void |
readConfig(java.lang.String configFile)
read specified configfile. |
java.lang.String |
toString(int indent)
Put information about this instance. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NgGrpcClient()
Method Detail |
public void activate(java.lang.String configFilename) throws GrpcException
activate
in interface GrpcClient
configFilename
- a name of configuration file.
GrpcException
- it it failed to initialize.public void activate(java.util.Properties prop) throws GrpcException
activate
in interface GrpcClient
prop
- information of server.
GrpcException
- if it failed to initialize.public GrpcFunctionHandle getFunctionHandle(java.lang.String functionName, java.util.Properties prop) throws GrpcException
GrpcFunctionHandle
for the specified function on the server.NgGrpcHandleAttr
as key strings.
getFunctionHandle
in interface GrpcClient
functionName
- a name of function.prop
- information of server.
GrpcFunctionHandle
.
GrpcException
- if it failed to create FunctionHandle.NgGrpcHandleAttr
public GrpcFunctionHandle getFunctionHandle(java.lang.String functionName) throws GrpcException
GrpcFunctionHandle
without server information.
getFunctionHandle
in interface GrpcClient
functionName
- a name of function.
GrpcFunctionHandle
.
GrpcException
- if it failed to create FunctionHandle.public GrpcFunctionHandle[] getFunctionHandles(java.lang.String functionName, java.util.Properties prop, int nHandles) throws GrpcException
GrpcFunctionHandle
for the specified function on the server.NgGrpcHandleAttr
as key strings.
getFunctionHandles
in interface GrpcClient
functionName
- a name of function.prop
- information of server.nHandles
- a number of FunctionHandle.
GrpcFunctionHandle
.
GrpcException
- if it failed to create FunctionHandle.NgGrpcHandleAttr
public GrpcFunctionHandle[] getFunctionHandles(java.lang.String functionName, int nHandles) throws GrpcException
GrpcFunctionHandle
without server information.
getFunctionHandles
in interface GrpcClient
functionName
- a name of function.nHandles
- a number of FunctionHandle.
GrpcFunctionHandle
.
GrpcException
- if it failed to create FunctionHandle.public GrpcObjectHandle getObjectHandle(java.lang.String objectName, java.util.Properties prop) throws GrpcException
GrpcObjectHandle
for the specified object on the server.NgGrpcHandleAttr
as key strings.
getObjectHandle
in interface GrpcClient
objectName
- a name of object.prop
- information of server.
GrpcObjectHandle
.
GrpcException
- if it failed to create ObjectHandle.NgGrpcHandleAttr
public GrpcObjectHandle getObjectHandle(java.lang.String objectName) throws GrpcException
GrpcObjectHandle
without server information.
getObjectHandle
in interface GrpcClient
objectName
- a name of object.
GrpcObjectHandle
.
GrpcException
- if it failed to create ObjectHandle.public GrpcObjectHandle[] getObjectHandles(java.lang.String objectName, java.util.Properties prop, int nHandles) throws GrpcException
GrpcObjectHandle
for the specified function on the server.
Use prop argument to set attribute variables of the server.NgGrpcHandleAttr
as key strings.
getObjectHandles
in interface GrpcClient
objectName
- a name of object.prop
- information of server.nHandles
- a number of ObjectHandle.
GrpcObjectHandle
.
GrpcException
- if it failed to create ObjectHandle.NgGrpcHandleAttr
public GrpcObjectHandle[] getObjectHandles(java.lang.String objectName, int nHandles) throws GrpcException
GrpcObjectHandle
without server information.
getObjectHandles
in interface GrpcClient
objectName
- a name of object.nHandles
- a number of ObjectHandle.
GrpcObjectHandle
.
GrpcException
- if it failed to create ObjectHandle.public void deactivate() throws GrpcException
GrpcClient
deactivate
in interface GrpcClient
GrpcException
- if it failed to finalize.public int getID()
public java.lang.Object getHandle(int executableID)
executableID
- ID of Grpc*Handle.
public GrpcFunctionHandle getFunctionHandle(int executableID)
executableID
- ID of GrpcFunctionHandle.
public GrpcObjectHandle getObjectHandle(int executableID)
executableID
- ID of GrpcObjectHandle.
public void readConfig(java.lang.String configFile) throws GrpcException
configFile
-
GrpcException
public java.lang.String toString(int indent)
indent
- a number of white spaces before information.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |