de.janrufmonitor.service
Class AbstractReceiverConfigurableService

java.lang.Object
  extended by de.janrufmonitor.service.AbstractConfigurableService
      extended by de.janrufmonitor.service.AbstractReceiverConfigurableService
All Implemented Interfaces:
IConfigurable, IEventReceiver, IService

public abstract class AbstractReceiverConfigurableService
extends AbstractConfigurableService
implements IEventReceiver

This abstract class can be used as base class for a new service implementation which is supporting configuration and eventing.

Author:
Thilo Brandt

Field Summary
 
Fields inherited from class de.janrufmonitor.service.AbstractConfigurableService
CFG_ENABLED, CFG_PRIORITY, m_configuration, m_logger
 
Constructor Summary
AbstractReceiverConfigurableService()
          Default constructor.
 
Method Summary
 void enabledReceived(IEvent event)
          This method is called by the framework if an event is fired by the event broker and the received event passes the service enabled check.
abstract  String getID()
          Gets the ID of the new service.
abstract  String getNamespace()
          Gets the namespace of the configurable object.
 String getReceiverID()
          Gets the ID of the receiver
 void received(IEvent event)
          Receives the event for which this event receiver is registered for.
 void receivedIdentifiedCall(IEvent event)
          This method is called by the framework if an event of type EVENT_TYPE_IDENTIFIED_CALL was fired by the event broker and the service passes the enabled check.
 void receivedOtherEventCall(IEvent event)
          This method is called by the framework if an event of any type except EVENT_TYPE_IDENTIFIED_CALL was fired by the event broker and the service passes the enabled check.
 void receivedValidRule(ICall aCall)
          This method is called by the framework if the service passes the valid rule check.
 
Methods inherited from class de.janrufmonitor.service.AbstractConfigurableService
getConfigurableID, getDependencyServices, getPriority, getRuntime, getServiceID, isEnabled, isRunning, restart, setConfiguration, setEnabled, shutdown, startup, 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.event.IEventReceiver
getPriority
 

Constructor Detail

AbstractReceiverConfigurableService

public AbstractReceiverConfigurableService()
Default constructor.

Method Detail

received

public void received(IEvent event)
Description copied from interface: IEventReceiver
Receives the event for which this event receiver is registered for.

Specified by:
received in interface IEventReceiver
Parameters:
event - the event to receive

enabledReceived

public void enabledReceived(IEvent event)
This method is called by the framework if an event is fired by the event broker and the received event passes the service enabled check. This method can be overriden by any implementation.

Parameters:
event - evnt which was fired by the event broker

receivedIdentifiedCall

public void receivedIdentifiedCall(IEvent event)
This method is called by the framework if an event of type EVENT_TYPE_IDENTIFIED_CALL was fired by the event broker and the service passes the enabled check.

Parameters:
event - the identified call event

receivedOtherEventCall

public void receivedOtherEventCall(IEvent event)
This method is called by the framework if an event of any type except EVENT_TYPE_IDENTIFIED_CALL was fired by the event broker and the service passes the enabled check.

Parameters:
event - the event

receivedValidRule

public void receivedValidRule(ICall aCall)
This method is called by the framework if the service passes the valid rule check.

Parameters:
aCall - the incoming call

getReceiverID

public String getReceiverID()
Description copied from interface: IEventReceiver
Gets the ID of the receiver

Specified by:
getReceiverID in interface IEventReceiver
Returns:
receivers ID

getNamespace

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

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

getID

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

Specified by:
getID in class AbstractConfigurableService
Returns:
service ID


Copyright © 2010 by Thilo Brandt. All Rights Reserved.