de.janrufmonitor.framework.monitor
Class AbstractMonitorListener

java.lang.Object
  extended by de.janrufmonitor.framework.monitor.AbstractMonitorListener
All Implemented Interfaces:
IMonitorListener

public abstract class AbstractMonitorListener
extends Object
implements IMonitorListener

This abstract class can be used as base class for a new monitor listener component. It delivers default implementations for the CAPI event methods.

Author:
Thilo Brandt

Field Summary
protected  Logger m_logger
           
protected  List m_monitors
           
 
Constructor Summary
AbstractMonitorListener()
           
 
Method Summary
 void doCallConnect(ICall call)
          Informs the framework of an new call connection.
 void doCallDisconnect(ICall call)
          Informs the framework of a call disconnection.
 String[] getCapiInformation()
           
abstract  IMonitor getDefaultMonitor()
          Gets the default monitor object this listener is registered to.
abstract  String getID()
          Gets a unique ID of this listener
 IMonitor getMonitor(String id)
          Gets the monitor object this listener is registered to with aspecific ID.
 List getMonitors()
          Gets the monitor objects this listener is registered to.
abstract  boolean isEnabled()
          Indicates wether listener is enabled or not.
abstract  boolean isRunning()
          Indicates wether listener is running or not.
 void shutdown()
          This method is called on shutdown time by the runtime object.
 void startup()
          This method is called on startup time by the runtime object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.janrufmonitor.framework.monitor.IMonitorListener
start, stop
 

Field Detail

m_logger

protected Logger m_logger

m_monitors

protected List m_monitors
Constructor Detail

AbstractMonitorListener

public AbstractMonitorListener()
Method Detail

doCallConnect

public void doCallConnect(ICall call)
Description copied from interface: IMonitorListener
Informs the framework of an new call connection.

Specified by:
doCallConnect in interface IMonitorListener
Parameters:
call - call incoming

doCallDisconnect

public void doCallDisconnect(ICall call)
Description copied from interface: IMonitorListener
Informs the framework of a call disconnection.

Specified by:
doCallDisconnect in interface IMonitorListener
Parameters:
call - call to be disconnected

getCapiInformation

public String[] getCapiInformation()

getMonitor

public IMonitor getMonitor(String id)
Description copied from interface: IMonitorListener
Gets the monitor object this listener is registered to with aspecific ID.

Specified by:
getMonitor in interface IMonitorListener
Returns:
IMonitor objects of the specified ID or null, if it does not exist.

getMonitors

public List getMonitors()
Description copied from interface: IMonitorListener
Gets the monitor objects this listener is registered to.

Specified by:
getMonitors in interface IMonitorListener
Returns:
List of IMonitor objects

isEnabled

public abstract boolean isEnabled()
Description copied from interface: IMonitorListener
Indicates wether listener is enabled or not.

Specified by:
isEnabled in interface IMonitorListener
Returns:
true if enabled, otherwise false.

isRunning

public abstract boolean isRunning()
Description copied from interface: IMonitorListener
Indicates wether listener is running or not.

Specified by:
isRunning in interface IMonitorListener
Returns:
true if running, otherwise false.

getDefaultMonitor

public abstract IMonitor getDefaultMonitor()
Description copied from interface: IMonitorListener
Gets the default monitor object this listener is registered to.

Specified by:
getDefaultMonitor in interface IMonitorListener
Returns:
IMonitor object of the default implementation

getID

public abstract String getID()
Gets a unique ID of this listener

Returns:
a unique ID

shutdown

public void shutdown()
Description copied from interface: IMonitorListener
This method is called on shutdown time by the runtime object.

Specified by:
shutdown in interface IMonitorListener

startup

public void startup()
Description copied from interface: IMonitorListener
This method is called on startup time by the runtime object.

Specified by:
startup in interface IMonitorListener


Copyright © 2010 by Thilo Brandt. All Rights Reserved.