Activity Log Writer

In this section:

An activity log writer receives control at strategic points in a message cycle:

The driver can maintain a log or perform another activity as desired.

The log writer extends com.ibi.edaqm.XDLogBase. The calls pass in the worker, internal signature information, and the message being worked on. For example, the start method receives the original document, while the emit entry receives the message just prior to it being emitted.

Most calls pass timing information. The now field is the current time (obtained by System.getCurrentTimeMillis()) when the call is made. Synchronizations or simply dispatching rules may prevent the call from reaching the driver at that time, however, this is the actual time of the event. The cpu and user fields provide CPU and user time as defined for the iWay measurement extension. These fields are set to 0, unless the iWay measurement extension is installed and operational.

Log entries provide the current context in the form of access to the special register manager. Using the manager, the context can be iterated and thus examined and stored.


Top of page

x
startEntry

Called for any type of message except streaming input type.

public int startEntry(XDWorker worker,
         byte[] who, 
         String protocol, 
         XDOrgData orgdata,
         ISpecRegManager srm,
         long now, long cpu, long user)

Top of page

x
endEntry

Called when the message operation ends, regardless of whether there were intermediate emits.

public int endEntry(XDWorker worker,
       byte[] who,
       String status,
       String msg,
       ISpecRegManager srm,
       long now, long cpu, long user)

Top of page

x
msgEntry

Logs a message to the transaction log. Messages are those emitted as BIZERROR messages. In the event of an error, error information is usually logged as standard ending information.

public int msgEntry(XDWorker worker,
       byte[] who,
       int level,
       String message,
       ISpecRegManager srm,
       long now, long cpu, long user)

Top of page

x
emitEntry

An emit operation is being performed to send a message to a recipient.

public int emitEntry(XDWorker worker,
        byte[] who,
        String protocol,
        String destination,
        byte[] data,
        ISpecRegManager srm,
        long now, long cpu, long user)

Top of page

x
eventEntry

Events include the start and end of a component such as an agent or the parser, or other significant events. The call passes the event code, the "direction", and any appropriate text. For example, a pair of event entries surrounding the calling of an agent will contain the name of the agent.

A complete list of event codes is given in the Javadoc for the LogBase class.

public int eventEntry(XDWorker worker,
         byte[] who, 
         int eventCode,
         int action,    // 0=begin, 1=end, 2=fail
         String message, 
         ISpecRegManager srm,
         long now, long cpu, long user)

iWay Software