de.janrufmonitor.repository
Class AbstractConfigurableCallerManager

java.lang.Object
  extended by de.janrufmonitor.repository.AbstractConfigurableCallerManager
All Implemented Interfaces:
IConfigurable, IManager, IRepositoryManager, ICallerManager
Direct Known Subclasses:
AbstractReadOnlyCallerManager, AbstractReadWriteCallerManager

public abstract class AbstractConfigurableCallerManager
extends Object
implements ICallerManager, IConfigurable

This abstract class can be used as base class for a new caller manager implementation which is supporting configuration.

Author:
Thilo Brandt

Field Summary
protected  String CFG_ENABLED
           
protected  String CFG_PRIO
           
protected  Properties m_configuration
           
protected  String m_externalID
           
protected  Logger m_logger
           
 
Constructor Summary
AbstractConfigurableCallerManager()
           
 
Method Summary
protected  void addCreationAttributes(ICaller c)
           
protected  void addSystemAttributes(ICaller c)
           
 String getConfigurableID()
          Gets the ID of the configurable object.
abstract  String getID()
          Gets the ID of the new caller manager.
 String getManagerID()
          Gets the ID of a manager implementation
abstract  String getNamespace()
          Gets the namespace of the configurable object.
 int getPriority()
          Gets priority of a manager, which is needed to be handled by the framework.
abstract  IRuntime getRuntime()
          Gets the runtime objects.
 boolean isActive()
          Gets the status of the repository manager
protected  boolean isInternalNumber(IPhonenumber pn)
          Checks wether a IPhonenumber object is an internal number or not.
 void restart()
          This method is called on restart time by the runtime object.
 void setConfiguration(Properties configuration)
          Sets the configuration in the configurable object.
 void setManagerID(String id)
          Sets the ID of a manager implementation
 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.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.janrufmonitor.framework.manager.IRepositoryManager
isSupported
 

Field Detail

CFG_PRIO

protected String CFG_PRIO

CFG_ENABLED

protected String CFG_ENABLED

m_configuration

protected Properties m_configuration

m_logger

protected Logger m_logger

m_externalID

protected String m_externalID
Constructor Detail

AbstractConfigurableCallerManager

public AbstractConfigurableCallerManager()
Method Detail

isActive

public boolean isActive()
Description copied from interface: IRepositoryManager
Gets the status of the repository manager

Specified by:
isActive in interface IRepositoryManager
Returns:
true, if the repository manager is active

getPriority

public int getPriority()
Description copied from interface: IManager
Gets priority of a manager, which is needed to be handled by the framework.

Specified by:
getPriority in interface IManager
Returns:
Id of this Manager

getConfigurableID

public String getConfigurableID()
Description copied from interface: IConfigurable
Gets the ID of the configurable object.

Specified by:
getConfigurableID in interface IConfigurable
Returns:
a valid and unique ID

setConfiguration

public void setConfiguration(Properties configuration)
Description copied from interface: IConfigurable
Sets the configuration in the configurable object. This method is called by the configuration notifier to interact with its registered components.

Specified by:
setConfiguration in interface IConfigurable
Parameters:
configuration - the configuration for the given namespace

getRuntime

public abstract IRuntime getRuntime()
Gets the runtime objects.

Returns:
the current runtime object.

getID

public abstract String getID()
Gets the ID of the new caller manager. The ID is taken for registration at caller manager factory and at the configurable notifier.

Returns:
caller manager ID

getNamespace

public abstract String getNamespace()
Description copied from interface: IConfigurable
Gets the namespace of the configurable object.

Specified by:
getNamespace in interface IConfigurable
Returns:
a valid and unique namespace

isInternalNumber

protected boolean isInternalNumber(IPhonenumber pn)
Checks wether a IPhonenumber object is an internal number or not.

Parameters:
pn - number to be checked
Returns:
true if number is internal, false if not

setManagerID

public void setManagerID(String id)
Description copied from interface: IManager
Sets the ID of a manager implementation

Specified by:
setManagerID in interface IManager

getManagerID

public String getManagerID()
Description copied from interface: IManager
Gets the ID of a manager implementation

Specified by:
getManagerID in interface IManager
Returns:
Id of this Manager

restart

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

Specified by:
restart in interface IManager

shutdown

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

Specified by:
shutdown in interface IManager

startup

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

Specified by:
startup in interface IManager

toString

public String toString()
Overrides:
toString in class Object

addCreationAttributes

protected void addCreationAttributes(ICaller c)

addSystemAttributes

protected void addSystemAttributes(ICaller c)


Copyright © 2010 by Thilo Brandt. All Rights Reserved.