|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A service factory is responsible for construction and destruction of a single service. A service factory provides the kernel the start conditions, stopped conditions, owned services and enabled status of the service.
| Method Summary | |
void |
addStartCondition(ServiceCondition startCondition)
Adds start condition to this service. |
void |
addStopCondition(ServiceCondition stopCondition)
Adds stop condition to this service. |
java.lang.Object |
createService(ServiceContext serviceContext)
Creates the service instance. |
void |
destroyService(ServiceContext serviceContext)
Destroys the service instance. |
java.util.Set |
getOwnedServices()
Gets the names of services owned by this service. |
java.util.Set |
getStartConditions()
Get an unmodifable snapshot of the conditions that must be satisfied before this service can be started. |
java.util.Set |
getStopConditions()
Get an unmodifable snapshot of the conditions that must be satisfied before this service can be stopped. |
java.lang.Class[] |
getTypes()
Gets the types of the service this service factory will create. |
boolean |
isEnabled()
Determines if the service can be instantiated in a kernel. |
boolean |
isRestartable()
A restartable service can be started and stopped repeatedly in the kernel. |
void |
removeStartCondition(ServiceCondition startCondition)
Removes a start condition from this service. |
void |
removeStopCondition(ServiceCondition stopCondition)
Removes a stop condition from this service. |
void |
setEnabled(boolean enabled)
Sets the enabled status of this service factory. |
| Method Detail |
public java.lang.Class[] getTypes()
public boolean isRestartable()
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - the new enabled state of this factorypublic java.util.Set getStartConditions()
public void addStartCondition(ServiceCondition startCondition)
throws java.lang.NullPointerException
startCondition - the new start condition
java.lang.NullPointerException - if startCondition is null
public void removeStartCondition(ServiceCondition startCondition)
throws java.lang.NullPointerException
startCondition - the start condition to remove
java.lang.NullPointerException - if startCondition is nullpublic java.util.Set getStopConditions()
public void addStopCondition(ServiceCondition stopCondition)
throws java.lang.NullPointerException
stopCondition - the new stop condition
java.lang.NullPointerException - if stopCondition is null
public void removeStopCondition(ServiceCondition stopCondition)
throws java.lang.NullPointerException
stopCondition - the stop condition to remove
java.lang.NullPointerException - if stopCondition is nullpublic java.util.Set getOwnedServices()
public java.lang.Object createService(ServiceContext serviceContext)
throws java.lang.Exception
serviceContext - context information for the new service
java.lang.Exception - if a problem occurs during constructionpublic void destroyService(ServiceContext serviceContext)
serviceContext - the context information for the service
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||