wt.services
Class ServiceEventListenerAdapter

java.lang.Object
  extended by wt.services.ServiceEventListenerAdapter
All Implemented Interfaces:
KeyedEventListener
Direct Known Subclasses:
ManagedBaselineStoreListener

public class ServiceEventListenerAdapter
extends Object
implements KeyedEventListener

An implementation of KeyedEventListener used by services to handle service events. This adapter adds an operation called logNotification which writes event information to the log. This class also provides default notification methods which log the notifications when wt.services.VERBOSE_EVENTS is set to true. Subclasses may override the notification methods but should honor the logging contract when wt.services.VERBOSE_EVENTS is true.

Supported API: true

Extendable: false


Constructor Summary
ServiceEventListenerAdapter(String serviceId)
          Construct ServiceEventListenerAdapter with service id.
 
Method Summary
 void notifyEvent(Object eventObject)
          Notify the listener that a single-object event has occurred.
 void notifyMultiObjectEvent(Object eventObject)
          Notify the listener that a multi-object event has occurred.
 void notifyVetoableEvent(Object eventObject)
          Notify the listener that a single-object event has occurred.
 void notifyVetoableMultiObjectEvent(Object eventObject)
          Notify the listener that a multi-object event has occurred.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceEventListenerAdapter

public ServiceEventListenerAdapter(String serviceId)
Construct ServiceEventListenerAdapter with service id.

Supported API: true

Parameters:
serviceId - String used for identifying the service
Method Detail

notifyEvent

public void notifyEvent(Object eventObject)
Notify the listener that a single-object event has occurred.

Supported API: true

Specified by:
notifyEvent in interface KeyedEventListener
Parameters:
eventObject -

notifyVetoableEvent

public void notifyVetoableEvent(Object eventObject)
                         throws Exception
Notify the listener that a single-object event has occurred. Sometimes the listener may object to the event by throwing an exception. Whether the exception will be honored depends on the object which generated the event.

Supported API: true

Specified by:
notifyVetoableEvent in interface KeyedEventListener
Parameters:
eventObject -
Throws:
Exception - the dispatcher and listener must agree on the exception type.

notifyMultiObjectEvent

public void notifyMultiObjectEvent(Object eventObject)
Notify the listener that a multi-object event has occurred.

Supported API: true

Specified by:
notifyMultiObjectEvent in interface KeyedEventListener
Parameters:
eventObject -

notifyVetoableMultiObjectEvent

public void notifyVetoableMultiObjectEvent(Object eventObject)
                                    throws Exception
Notify the listener that a multi-object event has occurred. Sometimes the listener may object to the event by throwing an exception. Whether the exception will be honored depends on the object which generated the event.

Supported API: true

Specified by:
notifyVetoableMultiObjectEvent in interface KeyedEventListener
Parameters:
eventObject -
Throws:
Exception - the dispatcher and listener must agree on the exception type.