|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Descriptor
knows how an object can be created.
A WireDefinition contains a map of Descriptors. They are used
by the WireContext that will build and cache the objects.
| Field Summary | |
|---|---|
static String |
EVENT_CONSTRUCTED
is fired when object construction is completed. |
static String |
EVENT_CONSTRUCTING
is fired when construction of a wired object starts. |
static String |
EVENT_INITIALIZING
is fired when initialization of a wired object starts (after construction). |
static String |
EVENT_REMOVE
is fired when an object is being removed from the cache of the wire context with WireContext.remove(String). |
static String |
EVENT_SET
is fired when an object is being set into the cache of this wire context with WireContext.set(String, Object). |
| Method Summary | |
|---|---|
Object |
construct(WireContext wireContext)
constructs the object. |
String |
getName()
the name of this descriptor |
Class<?> |
getType(WireDefinition wireDefinition)
the type of the produced object or null if that is not available |
void |
initialize(Object object,
WireContext wireContext)
called by the WireContext to initialize the specified object. |
boolean |
isDelayable()
Checks if the initialization should be done during the construction phase or if it can be done later. |
boolean |
isEagerInit()
if eager initialization is set, it means that an object must be created immediately during construction of the WireContext. |
| Methods inherited from interface org.ow2.orchestra.pvm.internal.util.Observable |
|---|
addListener, addListener, addListener, fire, fire, removeListener |
| Field Detail |
|---|
static final String EVENT_CONSTRUCTING
WireObjectEventInfo.
WireContext,
Constant Field Valuesstatic final String EVENT_INITIALIZING
WireObjectEventInfo.
WireContext,
Constant Field Valuesstatic final String EVENT_CONSTRUCTED
WireObjectEventInfo.
WireContext,
Constant Field Valuesstatic final String EVENT_SET
WireContext.set(String, Object). The provided event is a
WireObjectEventInfo.
WireContext,
Constant Field Valuesstatic final String EVENT_REMOVE
WireContext.remove(String). The provided event is a
WireObjectEventInfo.
WireContext,
Constant Field Values| Method Detail |
|---|
String getName()
Class<?> getType(WireDefinition wireDefinition)
boolean isEagerInit()
WireContext.
Object construct(WireContext wireContext)
wireContext - WireContext in which the object is created. This is also
the WireContext where the object will search for other
object that may be needed during the initialization phase.
boolean isDelayable()
false if the initialization should be done during the
creation phase, true if it can be done later.
void initialize(Object object,
WireContext wireContext)
WireContext section
lifecycle.
object - object to initialize.wireContext - the context in which the object will be initialized.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||