Resource monitor sample
The samples in the resourcemonitor folder monitor the ManagerTransport object.
Compiling the resource monitor files
Run the following command line in the etjava/examples directory.
javac -sourcepath source -d classes -classpath ../lib/enttoolkit.jar \source/com/entrust/toolkit/examples/resourcemonitor/ManagerTransportEvent.java \source/com/entrust/toolkit/examples/resourcemonitor/SampleEventHandler.javaThe SampleEventHandler class creates a customized event handler. An end-user application may require a different means of event handling.
Running ManagerTransportEvent
Run the following command line in the etjava/examples directory.
java -classpath classes;../lib/enttoolkit.jar com.entrust.toolkit.examples.resourcemonitor.ManagerTransportEvent <ip> <port> |
Parameter |
Value |
|
<ip> |
The IP address of the transport manager. |
|
<port> |
The port for accessing the transport manager. |
For example:
manager ip: goodPKImanager port: 829Running SimpleMonitorExample...Thu Jul 13 13:02:50 EDT 2006: The Entrust PKI is functioning normallyThu Jul 13 13:02:50 EDT 2006: The Entrust PKI is functioning normallyThu Jul 13 13:02:50 EDT 2006: The Entrust PKI is functioning normallyThu Jul 13 13:02:51 EDT 2006: The Entrust PKI is functioning normallyThu Jul 13 13:02:52 EDT 2006: The Entrust PKI is functioning normallyThu Jul 13 13:02:53 EDT 2006: The Entrust PKI is functioning normallyThu Jul 13 13:02:54 EDT 2006: The Entrust PKI is functioning normallyThu Jul 13 13:02:55 EDT 2006: The Entrust PKI is functioning normallyThu Jul 13 13:02:56 EDT 2006: The Entrust PKI is functioning normallyThu Jul 13 13:02:57 EDT 2006: The Entrust PKI is functioning normallyThu Jul 13 13:02:58 EDT 2006: The Entrust PKI is functioning normallyThu Jul 13 13:02:59 EDT 2006: The Entrust PKI is functioning normallyThu Jul 13 13:03:00 EDT 2006: The Entrust PKI is functioning normallyThu Jul 13 13:03:01 EDT 2006: The Entrust PKI is functioning normallyRunning SimpleEventHandlerExample...Running SimpleProcessorExample...SampleEventHandler: The message contained in the event was: The Entrust PKI is functioning normallySampleEventHandler: The message contained in the event was: The Entrust PKI is functioning normallySampleEventHandler: The message contained in the event was: The Entrust PKI is functioning normallySampleEventHandler: The message contained in the event was: The Entrust PKI is functioning normallySampleEventHandler: The message contained in the event was: The Entrust PKI is functioning normallyRunning ResourceMonitorExample (Results are contained in ResourceMonitorExample.log)...Running MultipleHandlerExample...Thu Jul 13 13:04:01 EDT 2006: The Entrust PKI is functioning normallySampleEventHandler: The message contained in the event was: The Entrust PKI is functioning normallyThu Jul 13 13:04:08 EDT 2006: The Entrust PKI is functioning normallySampleEventHandler: The message contained in the event was: The Entrust PKI is functioning normallyThu Jul 13 13:04:15 EDT 2006: The Entrust PKI is functioning normallySampleEventHandler: The message contained in the event was: The Entrust PKI is functioning normallyThu Jul 13 13:04:22 EDT 2006: The Entrust PKI is functioning normallySampleEventHandler: The message contained in the event was: The Entrust PKI is functioning normallyThu Jul 13 13:04:29 EDT 2006: The Entrust PKI is functioning normallySampleEventHandler: The message contained in the event was: The Entrust PKI is functioning normallyWhen there is a problem communicating with the Entrust Certificate Authority at the specified IP and port, the output is the following:
manager ip: badPKImanager port: 829Running SimpleMonitorExample...Thu Jul 13 13:10:57 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:10:58 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:10:59 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:11:00 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:11:01 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:11:02 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:11:03 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:11:04 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:11:05 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:11:06 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:11:07 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:11:08 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:11:09 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:11:10 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningRunning SimpleEventHandlerExample...SampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningRunning SimpleProcessorExample...SampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningRunning ResourceMonitorExample (Results are contained in ResourceMonitorExample.log)...Running MultipleHandlerExample...Thu Jul 13 13:12:10 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:12:17 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:12:24 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:12:31 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningThu Jul 13 13:12:38 EDT 2006: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be runningSampleEventHandler: The message contained in the event was: The connection with the Security Manager is not open; IP/port may be invalid or the Security Manager may not be running