org.sapia.soto
Interface ServiceConfiguration

All Known Implementing Classes:
ServiceMetaData

public interface ServiceConfiguration


Method Summary
 java.lang.Object getService()
           
 java.lang.Class getServiceClass()
           
 java.lang.String getServiceID()
           
 void invokeDisposeMethod()
          Invokes the "dispose" method on the service encapsulated by this instance (if such a dispose method was specified).
 void invokeInitMethod()
          Invokes the "init" method on the service encapsulated by this instance (if such an init method was specified).
 void invokeStartMethod()
          Invokes the "start" method on the service encapsulated by this instance (if such a start method was specified).
 void setService(java.lang.Object service)
          This method allows substituting the current service of this instance with another one.
 

Method Detail

getService

java.lang.Object getService()
Returns:
the service that this instance encapsulates.

getServiceClass

java.lang.Class getServiceClass()
Returns:
the Class corresponding to the type of service.

setService

void setService(java.lang.Object service)
This method allows substituting the current service of this instance with another one. It is meant for specific uses (such as proxying), and should not be called inadvertently.

Parameters:
service - a service object.

getServiceID

java.lang.String getServiceID()
Returns:
the ID of the service that this instance encapsulates - or null if no ID was assigned.

invokeInitMethod

void invokeInitMethod()
                      throws java.lang.Exception
Invokes the "init" method on the service encapsulated by this instance (if such an init method was specified).

Throws:
java.lang.Exception - if a problem occurs.

invokeStartMethod

void invokeStartMethod()
                       throws java.lang.Exception
Invokes the "start" method on the service encapsulated by this instance (if such a start method was specified).

Throws:
java.lang.Exception - if a problem occurs.

invokeDisposeMethod

void invokeDisposeMethod()
Invokes the "dispose" method on the service encapsulated by this instance (if such a dispose method was specified).

Throws:
java.lang.Exception - if a problem occurs.


Copyright © 2010 Sapia OSS. All Rights Reserved.