|
Apache Tuscany SCA Kernel Sub-Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tuscany.spi.AbstractLifecycle
org.apache.tuscany.spi.component.AbstractSCAObject
org.apache.tuscany.spi.extension.AtomicComponentExtension
public abstract class AtomicComponentExtension
An extension point for atomic component type, which new implementation types may extend
Field Summary | |
---|---|
protected Map<String,List<OutboundWire>> |
referenceWires
|
protected Scope |
scope
|
protected ScopeContainer |
scopeContainer
|
protected Map<String,InboundWire> |
serviceWires
|
protected WireService |
wireService
|
protected WorkContext |
workContext
|
protected WorkScheduler |
workScheduler
|
Fields inherited from class org.apache.tuscany.spi.component.AbstractSCAObject |
---|
listeners, parent, TRUE_FILTER |
Fields inherited from class org.apache.tuscany.spi.AbstractLifecycle |
---|
lifecycleState |
Fields inherited from interface org.apache.tuscany.spi.Lifecycle |
---|
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, STOPPED, STOPPING, UNINITIALIZED |
Constructor Summary | |
---|---|
protected |
AtomicComponentExtension(String name,
CompositeComponent parent,
ScopeContainer scopeContainer,
WireService wireService,
WorkContext workContext,
WorkScheduler workScheduler,
int initLevel)
|
Method Summary | |
---|---|
void |
addInboundWire(InboundWire wire)
Adds a target-side wire. |
void |
addOutboundWire(OutboundWire wire)
Adds a source-side wire for the given reference. |
void |
addOutboundWires(Class<?> multiplicityClass,
List<OutboundWire> wires)
Adds a set of source-side multiplicity wires for the given reference. |
TargetInvoker |
createAsyncTargetInvoker(InboundWire wire,
Operation operation)
Callback to create a TargetInvoker which dispatches to a service offered by
the component |
void |
destroy(Object instance)
Notifies the given instance of a destroy event |
InboundWire |
getInboundWire(String serviceName)
Returns the target-side wire associated with the given service name |
Map<String,InboundWire> |
getInboundWires()
Returns a map of inbound wires for a service. |
int |
getInitLevel()
Returns the initialization level for this component. |
Map<String,List<OutboundWire>> |
getOutboundWires()
Returns a map of source-side wires for references. |
Scope |
getScope()
Returns the artifact scope |
void |
init(Object instance)
Notifies the given instance of an initialization event |
boolean |
isEagerInit()
Returns whether component instances should be eagerly initialized |
protected void |
onReferenceWire(OutboundWire wire)
|
protected void |
onReferenceWires(Class<?> multiplicityClass,
List<OutboundWire> wires)
|
protected void |
onServiceWire(InboundWire wire)
|
void |
start()
Starts the Lifecycle. |
Methods inherited from class org.apache.tuscany.spi.component.AbstractSCAObject |
---|
addListener, addListener, getExtensions, getListeners, getName, getParent, isSystem, prepare, publish, removeListener, toString |
Methods inherited from class org.apache.tuscany.spi.AbstractLifecycle |
---|
getLifecycleState, setLifecycleState, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.tuscany.spi.component.AtomicComponent |
---|
createInstance |
Methods inherited from interface org.apache.tuscany.spi.component.Component |
---|
createTargetInvoker, getServiceInstance, getServiceInterfaces |
Methods inherited from interface org.apache.tuscany.spi.component.SCAObject |
---|
getExtensions, getName, getParent, getServiceInstance, isSystem, prepare |
Methods inherited from interface org.apache.tuscany.spi.event.EventPublisher |
---|
addListener, addListener, publish, removeListener |
Methods inherited from interface org.apache.tuscany.spi.Lifecycle |
---|
getLifecycleState, stop |
Field Detail |
---|
protected ScopeContainer scopeContainer
protected Scope scope
protected Map<String,InboundWire> serviceWires
protected Map<String,List<OutboundWire>> referenceWires
protected WireService wireService
protected WorkContext workContext
protected WorkScheduler workScheduler
Constructor Detail |
---|
protected AtomicComponentExtension(String name, CompositeComponent parent, ScopeContainer scopeContainer, WireService wireService, WorkContext workContext, WorkScheduler workScheduler, int initLevel)
Method Detail |
---|
public Scope getScope()
SCAObject
getScope
in interface SCAObject
public int getInitLevel()
AtomicComponent
getInitLevel
in interface AtomicComponent
ComponentDefinition.getInitLevel()
public boolean isEagerInit()
AtomicComponent
isEagerInit
in interface AtomicComponent
public void start() throws CoreRuntimeException
Lifecycle
start
in interface Lifecycle
start
in class AbstractLifecycle
CoreRuntimeException
public void init(Object instance) throws TargetException
AtomicComponent
init
in interface AtomicComponent
TargetException
public void destroy(Object instance) throws TargetException
AtomicComponent
destroy
in interface AtomicComponent
TargetException
public void addInboundWire(InboundWire wire)
Component
addInboundWire
in interface Component
public InboundWire getInboundWire(String serviceName)
Component
getInboundWire
in interface Component
public Map<String,InboundWire> getInboundWires()
Component
getInboundWires
in interface Component
public void addOutboundWire(OutboundWire wire)
Component
addOutboundWire
in interface Component
public Map<String,List<OutboundWire>> getOutboundWires()
Component
getOutboundWires
in interface Component
public void addOutboundWires(Class<?> multiplicityClass, List<OutboundWire> wires)
Component
addOutboundWires
in interface Component
public TargetInvoker createAsyncTargetInvoker(InboundWire wire, Operation operation)
Component
TargetInvoker
which dispatches to a service offered by
the component
createAsyncTargetInvoker
in interface Component
operation
- the operation to invokeprotected void onReferenceWire(OutboundWire wire)
protected void onReferenceWires(Class<?> multiplicityClass, List<OutboundWire> wires)
protected void onServiceWire(InboundWire wire)
|
Apache Tuscany SCA Kernel Sub-Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |