com.evelopers.unimod.runtime.logger
Class SimpleLogger

java.lang.Object
  extended bycom.evelopers.unimod.runtime.AbstractEventProcessorListener
      extended bycom.evelopers.unimod.runtime.logger.SimpleLogger
All Implemented Interfaces:
EventProcessorListener

public class SimpleLogger
extends AbstractEventProcessorListener

Simple pluggable logger unit. Use Thread.currentThread() as identifier of execution process to handle offsets. Remember new offset after Position.START and forget it after Position.FINISH.


Constructor Summary
SimpleLogger(Logger log)
           
 
Method Summary
 void afterInputActionExecution(StateMachineContext context, StateMachinePath path, java.lang.String transition, java.lang.String inputAction, java.lang.String value)
          Input action was executed
 void afterOnEnterActionExecution(StateMachineContext context, StateMachinePath path, java.lang.String stateName, java.lang.String outputAction)
          Output action was executed
 void afterOutputActionExecution(StateMachineContext context, StateMachinePath path, java.lang.String transition, java.lang.String outputAction)
          Output action was executed
 void afterSubmachinesExecution(StateMachineContext context, Event event, StateMachinePath path, java.lang.String state)
           
 void beforeInputActionExecution(StateMachineContext context, StateMachinePath path, java.lang.String transition, java.lang.String inputAction)
          Input action will be executed
 void beforeOnEnterActionExecution(StateMachineContext context, StateMachinePath path, java.lang.String stateName, java.lang.String outputAction)
          Output action will be executed
 void beforeOutputActionExecution(StateMachineContext context, StateMachinePath path, java.lang.String transition, java.lang.String outputAction)
          Output action will be executed
 void beforeSubmachinesExecution(StateMachineContext context, Event event, StateMachinePath path, java.lang.String config)
           
 void eventProcessingFinished(StateMachineContext context, Event e, StateMachinePath path, StateMachineConfig c)
          Event processor finished processing of event e.
 void eventProcessingStarted(StateMachineContext context, Event e, StateMachinePath path, StateMachineConfig c)
          Event processor started processing of event e.
 void stateMachineCameToFinalState(StateMachineContext context, StateMachinePath path, StateMachineConfig config)
          Root state machine came to final state.
 void transitionCandidate(StateMachineContext context, StateMachinePath path, java.lang.String state, Event event, java.lang.String transition)
          Examine transition if it may be selected as transition to go
 void transitionFound(StateMachineContext context, StateMachinePath path, java.lang.String state, Event event, java.lang.String transition)
          Transition to go was found
 void transitionNotFound(StateMachineContext context, StateMachinePath path, java.lang.String state, Event event)
          Transition to go was not found.
 
Methods inherited from class com.evelopers.unimod.runtime.AbstractEventProcessorListener
afterSubmachineExecution, beforeSubmachineExecution, comeToState, compositeTargetState, eventSkipped, transitionsOfSuperstate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLogger

public SimpleLogger(Logger log)
Method Detail

eventProcessingStarted

public void eventProcessingStarted(StateMachineContext context,
                                   Event e,
                                   StateMachinePath path,
                                   StateMachineConfig c)
Description copied from interface: EventProcessorListener
Event processor started processing of event e.

Specified by:
eventProcessingStarted in interface EventProcessorListener
Overrides:
eventProcessingStarted in class AbstractEventProcessorListener

eventProcessingFinished

public void eventProcessingFinished(StateMachineContext context,
                                    Event e,
                                    StateMachinePath path,
                                    StateMachineConfig c)
Description copied from interface: EventProcessorListener
Event processor finished processing of event e.

Specified by:
eventProcessingFinished in interface EventProcessorListener
Overrides:
eventProcessingFinished in class AbstractEventProcessorListener

stateMachineCameToFinalState

public void stateMachineCameToFinalState(StateMachineContext context,
                                         StateMachinePath path,
                                         StateMachineConfig config)
Description copied from interface: EventProcessorListener
Root state machine came to final state.

Specified by:
stateMachineCameToFinalState in interface EventProcessorListener
Overrides:
stateMachineCameToFinalState in class AbstractEventProcessorListener

beforeSubmachinesExecution

public void beforeSubmachinesExecution(StateMachineContext context,
                                       Event event,
                                       StateMachinePath path,
                                       java.lang.String config)

afterSubmachinesExecution

public void afterSubmachinesExecution(StateMachineContext context,
                                      Event event,
                                      StateMachinePath path,
                                      java.lang.String state)

beforeOnEnterActionExecution

public void beforeOnEnterActionExecution(StateMachineContext context,
                                         StateMachinePath path,
                                         java.lang.String stateName,
                                         java.lang.String outputAction)
Description copied from interface: EventProcessorListener
Output action will be executed

Specified by:
beforeOnEnterActionExecution in interface EventProcessorListener
Overrides:
beforeOnEnterActionExecution in class AbstractEventProcessorListener

afterOnEnterActionExecution

public void afterOnEnterActionExecution(StateMachineContext context,
                                        StateMachinePath path,
                                        java.lang.String stateName,
                                        java.lang.String outputAction)
Description copied from interface: EventProcessorListener
Output action was executed

Specified by:
afterOnEnterActionExecution in interface EventProcessorListener
Overrides:
afterOnEnterActionExecution in class AbstractEventProcessorListener

beforeOutputActionExecution

public void beforeOutputActionExecution(StateMachineContext context,
                                        StateMachinePath path,
                                        java.lang.String transition,
                                        java.lang.String outputAction)
Description copied from interface: EventProcessorListener
Output action will be executed

Specified by:
beforeOutputActionExecution in interface EventProcessorListener
Overrides:
beforeOutputActionExecution in class AbstractEventProcessorListener

afterOutputActionExecution

public void afterOutputActionExecution(StateMachineContext context,
                                       StateMachinePath path,
                                       java.lang.String transition,
                                       java.lang.String outputAction)
Description copied from interface: EventProcessorListener
Output action was executed

Specified by:
afterOutputActionExecution in interface EventProcessorListener
Overrides:
afterOutputActionExecution in class AbstractEventProcessorListener

beforeInputActionExecution

public void beforeInputActionExecution(StateMachineContext context,
                                       StateMachinePath path,
                                       java.lang.String transition,
                                       java.lang.String inputAction)
Description copied from interface: EventProcessorListener
Input action will be executed

Specified by:
beforeInputActionExecution in interface EventProcessorListener
Overrides:
beforeInputActionExecution in class AbstractEventProcessorListener

afterInputActionExecution

public void afterInputActionExecution(StateMachineContext context,
                                      StateMachinePath path,
                                      java.lang.String transition,
                                      java.lang.String inputAction,
                                      java.lang.String value)
Description copied from interface: EventProcessorListener
Input action was executed

Specified by:
afterInputActionExecution in interface EventProcessorListener
Overrides:
afterInputActionExecution in class AbstractEventProcessorListener

transitionCandidate

public void transitionCandidate(StateMachineContext context,
                                StateMachinePath path,
                                java.lang.String state,
                                Event event,
                                java.lang.String transition)
Description copied from interface: EventProcessorListener
Examine transition if it may be selected as transition to go

Specified by:
transitionCandidate in interface EventProcessorListener
Overrides:
transitionCandidate in class AbstractEventProcessorListener

transitionFound

public void transitionFound(StateMachineContext context,
                            StateMachinePath path,
                            java.lang.String state,
                            Event event,
                            java.lang.String transition)
Description copied from interface: EventProcessorListener
Transition to go was found

Specified by:
transitionFound in interface EventProcessorListener
Overrides:
transitionFound in class AbstractEventProcessorListener

transitionNotFound

public void transitionNotFound(StateMachineContext context,
                               StateMachinePath path,
                               java.lang.String state,
                               Event event)
Description copied from interface: EventProcessorListener
Transition to go was not found. Bad model.

Specified by:
transitionNotFound in interface EventProcessorListener
Overrides:
transitionNotFound in class AbstractEventProcessorListener