|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.robokind.api.common.lifecycle.utils.SimpleLifecycle<T>
public class SimpleLifecycle<T>
Defines an empty lifecycle for managing a service with no dependencies.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.robokind.api.common.lifecycle.ServiceLifecycleProvider |
|---|
ServiceLifecycleProvider.Validator |
| Field Summary |
|---|
| Fields inherited from interface org.robokind.api.common.lifecycle.ServiceLifecycleProvider |
|---|
PROP_DEPENDENCY_ADDED, PROP_DEPENDENCY_REMOVED |
| Constructor Summary | |
|---|---|
SimpleLifecycle(T service,
Class<T> clazz)
Creates a SimpleLifecycle for the given service. |
|
SimpleLifecycle(T service,
Class<T> clazz,
Properties props)
Creates a SimpleLifecycle for the given service. |
|
SimpleLifecycle(T service,
Class<T> clazz,
String idKey,
String idStr,
Properties props)
|
|
SimpleLifecycle(T service,
String className)
Creates a SimpleLifecycle for the given service. |
|
SimpleLifecycle(T service,
String[] serviceClassNames,
Properties props)
|
|
SimpleLifecycle(T service,
String[] serviceClassNames,
String idKey,
String idStr,
Properties props)
|
|
SimpleLifecycle(T service,
String className,
Properties props)
Creates a SimpleLifecycle for the given service. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
A SimpleLifecycle has no dependencies and does not fire events. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
A SimpleLifecycle has no dependencies and does not fire events. |
void |
dependencyChanged(String dependencyId,
Object dependency,
Map<String,Object> dependencies)
Called after the service is started and a dependency is changed or removed. |
List<DependencyDescriptor> |
getDependencyDescriptors()
Returns a list describing the service dependencies required by this lifecycle provider. |
Properties |
getRegistrationProperties()
Returns the properties to be used when register the service managed by this lifecycle provider. |
T |
getService()
Returns the service managed by this lifecycle provider. |
String[] |
getServiceClassNames()
Returns the names of the interfaces this service implements and makes available. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
A SimpleLifecycle has no dependencies and does not fire events. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
A SimpleLifecycle has no dependencies and does not fire events. |
void |
start(Map<String,Object> dependencyMap)
Called the first time all dependencies are available. |
void |
stop()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleLifecycle(T service,
Class<T> clazz)
service - service for the lifecycle to handleclazz - class the service should be available as
public SimpleLifecycle(T service,
String className)
service - service for the lifecycle to handleclassName - class the service should be available as
public SimpleLifecycle(T service,
Class<T> clazz,
Properties props)
service - service for the lifecycle to handleclazz - class the service should be available asprops - Properties to use when registering the service
public SimpleLifecycle(T service,
Class<T> clazz,
String idKey,
String idStr,
Properties props)
public SimpleLifecycle(T service,
String className,
Properties props)
service - service for the lifecycle to handleclassName - class the service should be available asprops - Properties to use when registering the service
public SimpleLifecycle(T service,
String[] serviceClassNames,
String idKey,
String idStr,
Properties props)
public SimpleLifecycle(T service,
String[] serviceClassNames,
Properties props)
| Method Detail |
|---|
public void start(Map<String,Object> dependencyMap)
ServiceLifecycleProvider
start in interface ServiceLifecycleProvider<T>dependencyMap - dependencies needed to start the service lifecyclepublic void stop()
stop in interface ServiceLifecycleProvider<T>
public void dependencyChanged(String dependencyId,
Object dependency,
Map<String,Object> dependencies)
ServiceLifecycleProvider
dependencyChanged in interface ServiceLifecycleProvider<T>dependencyId - dependency id defined in the
DependencyDescriptordependency - the new dependency, or null if the dependency is no
longer available.public T getService()
ServiceLifecycleProvider
getService in interface ServiceLifecycleProvider<T>public List<DependencyDescriptor> getDependencyDescriptors()
ServiceLifecycleProvider
getDependencyDescriptors in interface ServiceLifecycleProvider<T>public Properties getRegistrationProperties()
ServiceLifecycleProvider
getRegistrationProperties in interface ServiceLifecycleProvider<T>public String[] getServiceClassNames()
ServiceLifecycleProvider
getServiceClassNames in interface ServiceLifecycleProvider<T>public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface PropertyChangeSourcelistener - public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface PropertyChangeSourcelistener -
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
addPropertyChangeListener in interface PropertyChangeSourcepropertyName - listener -
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
removePropertyChangeListener in interface PropertyChangeSourcepropertyName - listener -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||