verinec.netsim.loggers
Class Logger
java.lang.Object
org.jdom.Content
org.jdom.Element
verinec.netsim.loggers.events.Events
verinec.netsim.loggers.Logger
- All Implemented Interfaces:
- Serializable, Cloneable, Parent, IExtendedLogger, ILogger
public class Logger
- extends Events
- implements IExtendedLogger
Logger creates a single instance of a Logger. There is no Constructor but two
static methods that guarantee that there is only a single instance of a
logger.
- Version:
- $Revision: 1032 $
- Author:
- Dominik Jungo
- See Also:
- Serialized Form
| Methods inherited from class org.jdom.Element |
addContent, addContent, addContent, addContent, addContent, addNamespaceDeclaration, clone, cloneContent, getAdditionalNamespaces, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValue, getChild, getChild, getChildren, getChildren, getChildren, getChildText, getChildText, getChildTextNormalize, getChildTextNormalize, getChildTextTrim, getChildTextTrim, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getName, getNamespace, getNamespace, getNamespacePrefix, getNamespaceURI, getQualifiedName, getText, getTextNormalize, getTextTrim, getValue, indexOf, isAncestor, isRootElement, removeAttribute, removeAttribute, removeAttribute, removeChild, removeChild, removeChildren, removeChildren, removeContent, removeContent, removeContent, removeContent, removeNamespaceDeclaration, setAttribute, setAttribute, setAttribute, setAttributes, setContent, setContent, setContent, setContent, setName, setNamespace, setText, toString |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
instance
private static ILogger instance
Logger
public Logger()
Instance
public static ILogger Instance(ILogger logger)
throws NetSimException
- Sets the logger instance to a given instance of a logger.
- Parameters:
logger - a logger
- Returns:
- the instance of the logger
- Throws:
NetSimException - if there exists already another instance of a logger
Instance
public static ILogger Instance(String repository,
String stoptime)
- Creates a new Logger (@see Logger) if there isn't alreadyone and then it
returns the instance of the logger
- Parameters:
repository - repository of this loggerstoptime - stoptime of the simulation
- Returns:
- the single existing instance of the logger
getInstance
public static ILogger getInstance()
throws NetSimException
- gets the instace of the logger
- Returns:
- the instace of the logger
- Throws:
NetSimException - if the instance isn't set yet
getEvents
public Events getEvents()
- Description copied from interface:
IExtendedLogger
- gets the logged events
- Specified by:
getEvents in interface IExtendedLogger
- Returns:
- the logged events
- See Also:
IExtendedLogger.getEvents()