toolbox.services
Interface Service

Package class diagram package Service
All Known Implementing Classes:
AuditServiceDbImpl, BaseService, CurrencyCodeServiceISO4217Impl, DaoService, FreeMarkerTemplateServiceImpl, FTPService, JmsService, LDAPService, LDAPUserInfoService, LoggingFormatterTemplateImpl, LoggingServiceAsyncImpl, LoggingServiceDbImpl, LoggingServiceWSClientImpl, LoggingServiceXMLHttpClientImpl, MailService, ORMQueryServiceImpl, SimpleConsumerServiceImpl, SimpleGroupServiceImpl, SimpleMailServiceImpl, SimpleProducerServiceImpl, SimpleSocketServiceImpl, SimpleUDDIServiceImpl, SimpleUserServiceImpl, SocketClientService, UDDIService, WSClientService

public interface Service

Interface definining a generic service interface.

The interface only defines methods for initialisation and finalisation. It is up to the service implementer to define the behaviour of the service.

The purpose of this interface is to enable us to manage the service lifecycle in an implementation independent fashion.


Method Summary
 void create(java.lang.String name, java.lang.String confHome, ServiceEnvironment env, XMLProperties serviceConf)
          Method to initialise the service.
 void destroy()
          Method to destroy this service.
 

Method Detail

create

void create(java.lang.String name,
            java.lang.String confHome,
            ServiceEnvironment env,
            XMLProperties serviceConf)
            throws ServiceException
Method to initialise the service.

The service will be initialised with a reference to its runtime environment. The runtime environment can encapsulate all resources required by the service to execute successfully.

In addition to the service environment reference, the service also receives a reference to all custom configuration settings in the form of XML properties.

Parameters:
name - The name of the service.
confHome - The path to the configuration home directory.
env - ServiceEnvironment configured for this service.
serviceConf - Custom XML configuration settings.
Throws:
ServiceException - if the service cannot be created.

destroy

void destroy()
Method to destroy this service.