ibspan.log4jade.service
Class LoggingBehaviour

java.lang.Object
  extended by jade.core.behaviours.Behaviour
      extended by jade.core.behaviours.SimpleBehaviour
          extended by jade.core.behaviours.CyclicBehaviour
              extended by ibspan.log4jade.service.LoggingBehaviour
All Implemented Interfaces:
Serializable

public class LoggingBehaviour
extends CyclicBehaviour

Behaviour responsible for collecting incoming logging events.

Author:
Maciej Gawinecki
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jade.core.behaviours.Behaviour
Behaviour.RunnableChangedEvent
 
Field Summary
static String DEFAULT_LOGGING_POLICY_CLASS
          Default class for logging policy.
 
Fields inherited from class jade.core.behaviours.Behaviour
myAgent, myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING
 
Constructor Summary
LoggingBehaviour(Agent a, String policyClassName, String dir)
          Constructs logging behaviour with given policy.
 
Method Summary
 void action()
          Agent action.
 
Methods inherited from class jade.core.behaviours.CyclicBehaviour
done
 
Methods inherited from class jade.core.behaviours.SimpleBehaviour
reset
 
Methods inherited from class jade.core.behaviours.Behaviour
actionWrapper, block, block, getBehaviourName, getDataStore, getExecutionState, getParent, handle, isRunnable, onEnd, onStart, restart, root, setAgent, setBehaviourName, setDataStore, setExecutionState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LOGGING_POLICY_CLASS

public static final String DEFAULT_LOGGING_POLICY_CLASS
Default class for logging policy.

See Also:
Constant Field Values
Constructor Detail

LoggingBehaviour

public LoggingBehaviour(Agent a,
                        String policyClassName,
                        String dir)
                 throws LoggingServiceException
Constructs logging behaviour with given policy.

Parameters:
a - owner agent
policyClassName - name of class representing logging policy
dir - directory containing configuration files for logging service
Throws:
LoggingServiceException - thrown if no policy found
See Also:
LoggingPolicy
Method Detail

action

public void action()
Agent action. Here comes main part: handling incoming logging events.

Specified by:
action in class Behaviour