org.openmdx.kernel.log.impl
Class MechanismManager

java.lang.Object
  extended by org.openmdx.kernel.log.impl.MechanismManager

public class MechanismManager
extends Object


Constructor Summary
MechanismManager(Log aLogger)
           
 
Method Summary
 void addMechanism(AbstractLoggingMechanism newMech)
          Adds a Logging Mechanism to the list of mechanisms that this log writes to.
 void addMechanism(String mechanismName)
          Adds a Logging Mechanism to the list of mechanisms..
 void addMechanisms(String[] mechs)
          Adds a Logging Mechanism to the list of mechanisms..
 AbstractLoggingMechanism[] getMechanisms()
          Returns a list with the currently active mechanisms.
 boolean isMechanismActive(String mechName)
          Checks if a mechanims given by its name is active.
 boolean isMechanismConfigured(String mechName)
          Checks if a mechanism is configured for this logger
 void register(MechanismManagerListener listener)
          Register a listener
 void removeAllMechanisms()
          Removes all Logging Mechanisms from the list of mechanisms that this log writes to.
 void removeMechanism(String mechName)
          Removes an active Logging Mechanism from the list of mechanisms that this log writes to.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MechanismManager

public MechanismManager(Log aLogger)
Method Detail

getMechanisms

public AbstractLoggingMechanism[] getMechanisms()
Returns a list with the currently active mechanisms. This list MUST be considered as read-only. Due to J# compatibility problems it's not possible to return a read-only collection.

Returns:
An array of mechanims (never returns a null array)

isMechanismActive

public boolean isMechanismActive(String mechName)
Checks if a mechanims given by its name is active.

Returns:
true if the mechanism is active

isMechanismConfigured

public boolean isMechanismConfigured(String mechName)
Checks if a mechanism is configured for this logger

Parameters:
mechName - a mechanism name
Returns:
true if configured

addMechanisms

public void addMechanisms(String[] mechs)
Adds a Logging Mechanism to the list of mechanisms..

Parameters:
name - The name of the Mechanism.

addMechanism

public void addMechanism(String mechanismName)
Adds a Logging Mechanism to the list of mechanisms..

Parameters:
name - The name of the Mechanism.

addMechanism

public void addMechanism(AbstractLoggingMechanism newMech)
Adds a Logging Mechanism to the list of mechanisms that this log writes to. Opens the mechanism and registers it also.

Parameters:
newMech - The name of the Logging Mechanism.

removeMechanism

public void removeMechanism(String mechName)
Removes an active Logging Mechanism from the list of mechanisms that this log writes to. Closes the mechanism and deregisters it also.

Parameters:
mechName - The name of the Logging Mechanism to remove.

removeAllMechanisms

public void removeAllMechanisms()
Removes all Logging Mechanisms from the list of mechanisms that this log writes to. Closes the mechanisms and deregisters them also.


register

public void register(MechanismManagerListener listener)
Register a listener

Parameters:
listener -

toString

public String toString()
Overrides:
toString in class Object


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.