|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xbean.kernel.AbstractServiceFactory
AbstractServiceFactory is an implementation of ServiceFactory that handles all of the mundane issues.
Constructor Summary | |
AbstractServiceFactory()
|
Method Summary | |
void |
addStartCondition(ServiceCondition startCondition)
Adds start condition to this service. |
void |
addStopCondition(ServiceCondition stopCondition)
Adds stop condition to 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. |
boolean |
isEnabled()
Determines if the service can be instantiated in a kernel. A disabled restartable service can not be started and a disabled non-restartable service can not be loaded into a 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. A disabled restartable service can not be started and a disabled non-restartable service can not be loaded into a kernel. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.xbean.kernel.ServiceFactory |
createService, destroyService, getOwnedServices, getTypes, isRestartable |
Constructor Detail |
public AbstractServiceFactory()
Method Detail |
public boolean isEnabled()
isEnabled
in interface ServiceFactory
public void setEnabled(boolean enabled)
setEnabled
in interface ServiceFactory
enabled
- the new enabled state of this factorypublic java.util.Set getStartConditions()
getStartConditions
in interface ServiceFactory
public void addStartCondition(ServiceCondition startCondition) throws java.lang.NullPointerException
addStartCondition
in interface ServiceFactory
startCondition
- the new start condition
java.lang.NullPointerException
- if startCondition is nullpublic void removeStartCondition(ServiceCondition startCondition) throws java.lang.NullPointerException
removeStartCondition
in interface ServiceFactory
startCondition
- the start condition to remove
java.lang.NullPointerException
- if startCondition is nullpublic java.util.Set getStopConditions()
getStopConditions
in interface ServiceFactory
public void addStopCondition(ServiceCondition stopCondition) throws java.lang.NullPointerException
addStopCondition
in interface ServiceFactory
stopCondition
- the new stop condition
java.lang.NullPointerException
- if stopCondition is nullpublic void removeStopCondition(ServiceCondition stopCondition) throws java.lang.NullPointerException
removeStopCondition
in interface ServiceFactory
stopCondition
- the stop condition to remove
java.lang.NullPointerException
- if stopCondition is null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |