Class: |
DimClient |
Library: |
DIM |
|
Author: |
C. Gaspar |
|
Version: |
v1.0 |
Update :Thu Feb 11 15:52:46
1999 |
Descrition :
To be used by DIM clients - implements static
methods relating to the Client
Mainly Sending Commands to Servers.
The methods sendCommand(...) will wait for the
command to be actualy sent to the Server
and return a completion code of :
1 - if it was successfully
sent.
0 - if it couldn't be
delivered.
The exception beeing: if the user calls this
method inside a Handler (infoHandler, serviceHandler,
commandHandler
and clientExitHandler) the
command will be sent but without waiting for reception
and the return code is not reliable (in order
to avoid deadlocks).
The methods sendCommandNB(...) are Non Blocking, i.e. they do not wait for
the command to be sent.
They should be used inside callback routines to avoid deadlocks
Public Functions :
-
static int sendCommand ( char * name, int data)
; //Send Integer as Command
-
static int sendCommand ( char * name, float
data) ; //Send Float as Command
-
static int sendCommand ( char * name, double
data) ; //Send Double
-
static int sendCommand ( char * name, String data) ; // Send a Character String
-
static int sendCommand ( char * name, int[] data)
; //Send Integer Array as Command
-
static int sendCommand ( char * name, float[]
data) ; //Send Float Array as Command
-
static int sendCommand ( char * name, double[]
data) ; //Send Double Array
-
static int sendCommandNB ( char * name, int data)
; //Send Integer as Command
-
static int sendCommandNB ( char * name, float
data) ; //Send Float as Command
-
static int sendCommandNB ( char * name, double
data) ; //Send Double
-
static int sendCommandNB ( char * name, String data) ; // Send a Character String
-
static int sendCommandNB ( char * name, int[] data)
; //Send Integer Array as Command
-
static int sendCommandNB ( char * name, float[]
data) ; //Send Float Array as Command
-
static int sendCommandNB ( char * name, double[]
data) ; //Send Double Array
Usage :
sendCommand Example:
public static void
main(String[] args)
{
DimClient.sendComamnd("SRV/ALLOCATE", 1);
...
DimClient.sendCommand("SRV/ALLOCATE", 0);
}
Last update : 02/19/99 12:49:03 by MkHelp
1.1.0