public class ComponentDescriptor extends Object
| Constructor and Description |
|---|
ComponentDescriptor() |
| Modifier and Type | Method and Description |
|---|---|
<T> ComponentDescriptor |
addDependency(Class<T> requiredInterface,
IBinder<T> binder)
Add a simple (Cardinality.One) dependency.
|
<T> ComponentDescriptor |
addDependency(Class<T> requiredInterface,
IBinder<T> binder,
Cardinality cardinality)
Add a dependency.
|
ComponentDescriptor |
addProvidedInterface(Class<?> providedInterface)
Add an interface which this component implements and which can
be provided to other components.
|
ComponentDescriptor |
addStart(Runnable handler)
Add a Runnable which will be called during process initialisation.
|
ComponentDescriptor |
addStop(Runnable handler)
Add a Runnable which will be called during process termination.
|
public <T> ComponentDescriptor addDependency(Class<T> requiredInterface, IBinder<T> binder)
requiredInterface - The interface of which an implementation is required.binder - The binder to be called with the injected value.public <T> ComponentDescriptor addDependency(Class<T> requiredInterface, IBinder<T> binder, Cardinality cardinality)
requiredInterface - The interface of which an implementation is required.cardinality - The number of instances which is required.binder - The binder to be called with the injected value.public ComponentDescriptor addProvidedInterface(Class<?> providedInterface)
providedInterface - An interface which is provided.public ComponentDescriptor addStart(Runnable handler)
handler - A Runnable to be called at start time.public ComponentDescriptor addStop(Runnable handler)
handler - A Runnable to be called at shutdown time.Copyright © 2018 Symphony Software Foundation. All rights reserved.