|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.soto.ServiceMetaData
public class ServiceMetaData
Holds meta information about a given service.
Service| Constructor Summary | |
|---|---|
ServiceMetaData(SotoContainer container,
java.lang.String id,
java.lang.Object service)
|
|
ServiceMetaData(SotoContainer container,
java.lang.String id,
java.lang.Object service,
java.util.List layers)
|
|
| Method Summary | |
|---|---|
void |
addAttribute(Attribute attr)
|
Attribute |
getAttribute(java.lang.String name)
|
java.util.Collection |
getAttributes()
|
java.util.List |
getLayers()
|
LifeCycleManager |
getLifeCycleManager()
|
java.lang.Object |
getService()
Returns this instance's associated service. |
java.lang.Class |
getServiceClass()
|
java.lang.String |
getServiceID()
Returns the identifier of the service to which this instance corresponds. |
void |
init()
Calls the init() method of this instance's service. |
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). |
boolean |
isInit()
|
boolean |
isStarted()
|
void |
setDisposeMethod(MethodConfig dispose)
|
void |
setInitMethod(MethodConfig init)
|
void |
setService(java.lang.Object obj)
Sets this instance's service. |
void |
setStartMethod(MethodConfig start)
|
void |
setType(java.lang.String type)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceMetaData(SotoContainer container,
java.lang.String id,
java.lang.Object service)
public ServiceMetaData(SotoContainer container,
java.lang.String id,
java.lang.Object service,
java.util.List layers)
| Method Detail |
|---|
public void setType(java.lang.String type)
type - the 'type' of service, in terms of its lifecycle.LifeCycleManager,
SotoContainer.registerLifeCycleManager(String, LifeCycleManager)public LifeCycleManager getLifeCycleManager()
LifeCycleManager corresponding to this instance.setType(String)public java.lang.String getServiceID()
getServiceID in interface ServiceConfigurationnull if the service to
which this instance corresponds is an "anonymous" service (it has
no ID).public void setService(java.lang.Object obj)
WARNING : in general, this method should not be called by client applications.
setService in interface ServiceConfigurationobj - a service instance.Servicepublic java.lang.Object getService()
getService in interface ServiceConfigurationpublic java.lang.Class getServiceClass()
getServiceClass in interface ServiceConfigurationClass corresponding to the type of service.public java.util.Collection getAttributes()
Collection of Attribute of this instance.public Attribute getAttribute(java.lang.String name)
name - the name of the desired attribute.
Attribute corresponding to the given name, or
Null if no such attribute exists.public java.util.List getLayers()
List of Layers that this instance
holds, or null if this instance has no layers
specified.public void addAttribute(Attribute attr)
attr - an Attribute.public boolean isInit()
true if the service corresponding
to this instance has had its init() method called.public boolean isStarted()
true if the service corresponding
to this instance has had its start() method called.
public void init()
throws java.lang.Exception
init() method of this instance's service.
java.lang.Exception - if a problem occurs performing this instance's
service initialization.
public void invokeInitMethod()
throws java.lang.Exception
ServiceConfiguration
invokeInitMethod in interface ServiceConfigurationjava.lang.Exception - if a problem occurs.
public void invokeStartMethod()
throws java.lang.Exception
ServiceConfiguration
invokeStartMethod in interface ServiceConfigurationjava.lang.Exception - if a problem occurs.public void invokeDisposeMethod()
ServiceConfiguration
invokeDisposeMethod in interface ServiceConfigurationpublic void setInitMethod(MethodConfig init)
public void setStartMethod(MethodConfig start)
public void setDisposeMethod(MethodConfig dispose)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||