All Packages This Package Class Hierarchy Class Search Index
java.lang.Object | +----com.syncbuilder.service.ServiceStateQueueAdaptor
Summary |
public class ServiceStateQueueAdaptor extends java.lang.Object implements com.syncbuilder.service.ServiceStateListener { // Constructors 1 public ServiceStateQueueAdaptor(); // Methods 4 public synchronized void addServiceStateListener(ServiceStateListener); public void destroy(); public synchronized void removeServiceStateListener(ServiceStateListener); public void stateChanged(ServiceStateEvent); }
This class serves two purposes:
1. It decouples the source of ServiceStateEvents from its listeners,
thus ensuring uninterrupted service, even if there is a problem with
event-delivery
2. It offers multicasting, which makes it unneccessary for event sources
to implement their own version of multicasting.
The life-cycle of the adaptor begins with the invocation of the constructor and ends with the invocation of the destroy()-method. It is always up and running in between these two points in time (you do not need to start or stop it, nor is this possible).
Constructors |
· ServiceStateQueueAdaptor | Summary | Top |
public ServiceStateQueueAdaptor()
Create a working ServiceStateQueueAdaptor. When this constructor has finished the Adaptor is running and ready for delivery of events.
Methods |
· stateChanged | Summary | Top |
public void stateChanged(ServiceStateEvent sse)
This method is part of the ServiceStateListener interface. Events which are sent to this method are delivered to all registered listeners. This is a non-blocking call!
- Implements:
- stateChanged in interface ServiceStateListener
· addServiceStateListener | Summary | Top |
public synchronized void addServiceStateListener(ServiceStateListener ssl)
Register a listener with the adaptor.
· removeServiceStateListener | Summary | Top |
public synchronized void removeServiceStateListener(ServiceStateListener ssl)
Unregister a listener from the adaptor. The listener will still receive all events which were scheduled for it by the time it was unregistered.
· destroy | Summary | Top |
public void destroy()
Ask the adaptor to release its resources and to cease working. Undelivered events may get lost. This call is idempotent!
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7