java.lang.Object
|
+--stec.iws.admin.MonitorEventHandler
public abstract MonitorEventHandler
Defines methods used by Servertec Internet Server Administrator Monitor.
Methods
Method
|
Description
|
destroy
|
Called by the Administrator Monitor to destroy the MonitorEventHandler.
|
init
|
Called by the Administrator Monitor to initialize the MonitorEventHandler.
|
processEvent
|
Called by Administrator Monitor to process the event.
|
destroy
Called by the Administrator Monitor to destroy the MonitorEventHandler.
Syntax
public void destroy()
Parameters
Returns
Throws
Example
public void destroy()
{
super.destroy();
}
init
Called by the Administrator Monitor to initialize the MonitorEventHandler.
Syntax
public void init(Hashtable parameters) throws Exception
Parameters
parameters
|
contains any initialization paramters
|
Returns
Throws
Exception
|
Thrown when any error occurs.
|
Example
public void init(Hahstable parameters) throws Exception
{
super.init(parameters);
}
processEvent
Called by Administrator Monitor to process the event.
Syntax
public abstract void processEvent(long timestamp,
String server,
String message)
throws Exception
Parameters
timestamp
|
the time when the event occurred.
|
server
|
the hostname and port number.
|
message
|
the event message.
|
Returns
Throws
Exception
|
any exception thrown.
|
Example
public void processEvent(long timestamp,
String server,
String message)
throws Exception
{
System.out.print("[");
System.out.print(new Date(timestamp).toString());
System.out.print("] ");
System.out.print(server);
System.out.print(": ");
System.out.println(message);
}
|