cgl.narada.service
Interface Service

All Known Subinterfaces:
OrderedDeliveryService, QosService, RdEntityActuatorService, RdRecoveryService, RdRetransmissionService

public interface Service

This class provides a set of core functions that service implementations need to satisfy. All services within the system need to conform to this interface.


Method Summary
 void deregisterServiceExceptionListener(String listenerId)
          Deregisters a previously registered service exception listener
 void deregisterServiceNotificationListener(String listenerId)
          De registers a previously registered service notification listener
 int[] getEventTypesHandled()
          Gets a list of the different types of events handled by the service
 String getServiceDescription()
          Returns a description of the service
 int[] getServicesPerformed()
          Gets a list of the services performed by this service
 void handleEvent(NBEvent nbEvent)
          This is an event invoked to handle processing for a given event
 boolean isStarted()
          Return true if the service is started and is running.
 boolean isStopped()
          Returns false if the service is stopped
 void loadService(Properties serviceProperties)
          Load the service based on the specified properties.
 void performService(NBEvent nbEvent, int serviceType, Service requestingService)
          Performs a service request by a service.
 void registerServiceExceptionListener(ServiceExceptionListener listener, String listenerId)
          A service exception listener allows a client to be notified of a problem asynchronously
 void registerServiceNotificationListener(ServiceNotificationListener listener, String listenerId)
          A service notification listener allows a client to be notified of a service related diagnostic information asynchronously
 void servicePerformed(NBEvent nbEvent, boolean status, ServiceException serviceException)
          This is the method called upon the completion of a previously requested service.
 void startService()
          Start the service.
 void stopService()
          Stop the service
 

Method Detail

loadService

void loadService(Properties serviceProperties)
                 throws ServiceException
Load the service based on the specified properties.

Throws:
ServiceException

startService

void startService()
                  throws ServiceException
Start the service. Throws a ServiceException, in the event that there are problems with starting the service

Throws:
ServiceException

stopService

void stopService()
                 throws ServiceException
Stop the service

Throws:
ServiceException

isStarted

boolean isStarted()
Return true if the service is started and is running.


isStopped

boolean isStopped()
Returns false if the service is stopped


getServiceDescription

String getServiceDescription()
Returns a description of the service


registerServiceExceptionListener

void registerServiceExceptionListener(ServiceExceptionListener listener,
                                      String listenerId)
                                      throws ServiceException
A service exception listener allows a client to be notified of a problem asynchronously

Throws:
ServiceException

deregisterServiceExceptionListener

void deregisterServiceExceptionListener(String listenerId)
                                        throws ServiceException
Deregisters a previously registered service exception listener

Throws:
ServiceException

registerServiceNotificationListener

void registerServiceNotificationListener(ServiceNotificationListener listener,
                                         String listenerId)
                                         throws ServiceException
A service notification listener allows a client to be notified of a service related diagnostic information asynchronously

Throws:
ServiceException

deregisterServiceNotificationListener

void deregisterServiceNotificationListener(String listenerId)
                                           throws ServiceException
De registers a previously registered service notification listener

Throws:
ServiceException

getEventTypesHandled

int[] getEventTypesHandled()
Gets a list of the different types of events handled by the service


handleEvent

void handleEvent(NBEvent nbEvent)
                 throws ServiceException
This is an event invoked to handle processing for a given event

Throws:
ServiceException

getServicesPerformed

int[] getServicesPerformed()
Gets a list of the services performed by this service


performService

void performService(NBEvent nbEvent,
                    int serviceType,
                    Service requestingService)
                    throws ServiceException
Performs a service request by a service.

Throws:
ServiceException

servicePerformed

void servicePerformed(NBEvent nbEvent,
                      boolean status,
                      ServiceException serviceException)
This is the method called upon the completion of a previously requested service. In the case that the service could not be performed for any reason, the status indicates this with the service exception providing a reason why.



For comments and suggestions please send e-mail to The NaradaBrokering Project
ODY> HTML>