se.ericsson.eto.norarc.javaframe
Class Trace

java.lang.Object
  extended byse.ericsson.eto.norarc.javaframe.Trace

public class Trace
extends java.lang.Object

This object produces Trace information to file or stream for one scheduler. The Trace object is given as parameter to the constructor of the Scheduler. Only very few methods are available to the application programmer

See Also:
Scheduler, TraceUserDefinedTask(java.lang.String), setTraceOn(boolean)

Field Summary
protected  long start_time
           
protected  boolean trace_on
           
 
Constructor Summary
Trace(boolean on, java.lang.String fileName)
          Constructor trace to file
Trace(boolean on, java.lang.String remote_address, int remote_port)
          Constructor trace to remote port
 
Method Summary
protected  java.lang.String fullStateName(State state)
          The full name of a nested State.
protected  void saveTraceData()
          Add text to the trace.
 void setTraceOn(boolean on)
          Control of trace production.
protected  void traceDefaultTransition(StateMachine sm, State st, Message msg)
           
protected  void traceHeader()
          Write the trace header.
protected  void traceInput(StateMachine sm, State st, Message msg)
          Trace receiption of an input message by a StateMachine.
protected  void traceNextState(State st)
          Trace transition to a new State.
protected  void traceOutput(Message msg, Mediator med)
          Trace output of a message in a transaction.
protected  void traceSameState(State st)
          Trace that the transition remains in the same State.
protected  void traceSave(StateMachine sm, State st, Message msg)
           
protected  void traceSMadded(StateMachine fsm)
          Trace that a new StateMachine has been generated.
protected  void traceTimestamp()
          Include a timestamp in the trace.
 void TraceUserDefinedTask(java.lang.String str)
          Produce Trace information from within user defined transitions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

trace_on

protected boolean trace_on

start_time

protected long start_time
Constructor Detail

Trace

public Trace(boolean on,
             java.lang.String fileName)
Constructor trace to file

Parameters:
on - trace info is produced iff true
fileName - trace file

Trace

public Trace(boolean on,
             java.lang.String remote_address,
             int remote_port)
      throws java.lang.Exception
Constructor trace to remote port

Parameters:
on - trace info produced iff true
remote_address - Inet address to JFTrace instantiation
remote_port - Port number to JFTrace instantiation
Method Detail

setTraceOn

public void setTraceOn(boolean on)
Control of trace production.

Parameters:
on - When true then there will be produced trace info otherwise not

saveTraceData

protected void saveTraceData()
Add text to the trace.


fullStateName

protected java.lang.String fullStateName(State state)
The full name of a nested State.

Parameters:
state - can be leaf, middle, or the top (representing the FSM) If state is the top, the name of top is return. Otherwise, top is not part of the full name.

traceHeader

protected void traceHeader()
Write the trace header.


traceTimestamp

protected void traceTimestamp()
Include a timestamp in the trace.


traceInput

protected void traceInput(StateMachine sm,
                          State st,
                          Message msg)
Trace receiption of an input message by a StateMachine.

Parameters:
sm - current StateMachine
st - current State of sm
msg - the message received

traceOutput

protected void traceOutput(Message msg,
                           Mediator med)
Trace output of a message in a transaction.

Parameters:
msg - the message to be sent
med - output mediator

traceNextState

protected void traceNextState(State st)
Trace transition to a new State.

Parameters:
st - the new State

traceSameState

protected void traceSameState(State st)
Trace that the transition remains in the same State.

Parameters:
st - current State

traceSMadded

protected void traceSMadded(StateMachine fsm)
Trace that a new StateMachine has been generated.

Parameters:
fsm - the new StateMachine

traceDefaultTransition

protected void traceDefaultTransition(StateMachine sm,
                                      State st,
                                      Message msg)

traceSave

protected void traceSave(StateMachine sm,
                         State st,
                         Message msg)

TraceUserDefinedTask

public void TraceUserDefinedTask(java.lang.String str)
Produce Trace information from within user defined transitions

Parameters:
str - A String with the information to be traced