toolbox.services
Interface ServiceEnvironment

Package class diagram package ServiceEnvironment
All Known Implementing Classes:
DaoServiceEnvironment, FTPServiceEnvironment, JmsServiceEnvironment, LDAPServiceEnvironment, MailServiceEnvironment, SocketClientServiceEnvironment, UDDIServiceEnvironment

public interface ServiceEnvironment

Interface that defines a generice service environment.

ServiceEnvironment implementations will provide infrastructure resources for services. For example: A database related service will require access to resources that will enable it to write and read data to and from a database.

ServiceEnvironment implementations will only be created when first accessed and will not be recreated unless when explicitly destroyed.


Method Summary
 void create(java.lang.String name, java.lang.String config)
          Method to initialise this service environment.
 void destroy()
          Method to destroy this service environment.
 java.lang.String getName()
          Return the name of this environment.
 

Method Detail

create

void create(java.lang.String name,
            java.lang.String config)
            throws ServiceException
Method to initialise this service environment.

The environment will only be created when first accessed. This ensures that costly operations are not duplicated everytime a service is requested.

Parameters:
name - The name of the environment.
config - File path to the configuration of this environment.
Throws:
ServiceException - if the environment cannot be created.

getName

java.lang.String getName()
Return the name of this environment.

Returns:
String containing the name of this environment.

destroy

void destroy()
             throws ServiceException
Method to destroy this service environment.

Throws:
ServiceException - if this environment cannot be destroyed.