|
|||||||||
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 Descriptor
s.
They are used by the WireContext
that will build and cache the
objects.
Field Summary | |
---|---|
static java.lang.String |
EVENT_CONSTRUCTED
is fired when object construction is completed. |
static java.lang.String |
EVENT_CONSTRUCTING
is fired when construction of a wired object starts. |
static java.lang.String |
EVENT_INITIALIZING
is fired when initialization of a wired object starts (after construction). |
static java.lang.String |
EVENT_REMOVE
is fired when an object is being removed from the cache of the wire context with WireContext.remove(String) . |
static java.lang.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 | |
---|---|
java.lang.Object |
construct(WireContext wireContext)
constructs the object. |
java.lang.String |
getName()
the name of this descriptor |
java.lang.Class<?> |
getType(WireDefinition wireDefinition)
the type of the produced object or null if that is not available |
void |
initialize(java.lang.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.jbpm.util.Observable |
---|
addListener, addListener, addListener, fire, fire, removeListener |
Field Detail |
---|
static final java.lang.String EVENT_CONSTRUCTING
WireObjectEventInfo
.
WireContext
,
Constant Field Valuesstatic final java.lang.String EVENT_INITIALIZING
WireObjectEventInfo
.
WireContext
,
Constant Field Valuesstatic final java.lang.String EVENT_CONSTRUCTED
WireObjectEventInfo
.
WireContext
,
Constant Field Valuesstatic final java.lang.String EVENT_SET
WireContext.set(String, Object)
. The provided event is a WireObjectEventInfo
.
WireContext
,
Constant Field Valuesstatic final java.lang.String EVENT_REMOVE
WireContext.remove(String)
. The provided event is a WireObjectEventInfo
.
WireContext
,
Constant Field ValuesMethod Detail |
---|
java.lang.String getName()
java.lang.Class<?> getType(WireDefinition wireDefinition)
boolean isEagerInit()
WireContext
.
java.lang.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(java.lang.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 |