Next: Some Simple Examples
Up: Logging Client API
Previous: C Interface
All cmlog Java classes are organized into a package all cmlog. Java
interface for logging clients are organized into a single Java
class called Client. The html version of the Java API document can be
found inside the cmlog Java distribution or can be generated from Java
source code using the javadoc utility. All configuration information
and status code are organized in a single Java class
Config.java. The following lists some of the important parameters:
-
- CMLOG_PORT = 8900
- CMLOG_CLNT_PORT= 8909
- CMLOG_CLNT_PIPE = "/tmp/cmlog/''
- CMLOG_CLNT_PIPE_PREFIX = "cmlog_"
- CMLOG_SUCCESS = 0
- CMLOG_ERROR = -1
- ......status codes......
- PROTOCOL_MAJOR_VERSION = 2
- PROTOCOL_MINOR_VERSION = 0
These parameters have to be consistent with those defined in the C/C++
header files such as CMLOG/Common/cmlogConfig.h (cmlogProtocol.h).
- Client (java.lang.String progname)
- Description
This is a constructor for a Java logging Client.
It takes an argument that denotes the name of this
client.
- connect ()
- Description
Connect this client to a cmlog system. The server port,
client daemon port and protocol version are all
controlled inside bf Config.java. These parameters
can be changed statically or dynamically on the fly.
- boolean connected ()
- Description
Check whether this client is connected to a cmlog system.
- boolean connected ()
- Description
Check whether this client is connected to a cmlog system.
- disconnect ()
- Description
Disconnect this client from the system.
- void postData (cdevData data)
- Description
Log a message/data into the system. Please check
cdevData APIs to find out how to populate a cdevData.
Next: Some Simple Examples
Up: Logging Client API
Previous: C Interface
Jie chen
2001-10-22