org.apache.tuscany.spi.component
Class AbstractSCAObject
java.lang.Object
org.apache.tuscany.spi.AbstractLifecycle
org.apache.tuscany.spi.component.AbstractSCAObject
- All Implemented Interfaces:
- SCAObject, EventPublisher, Lifecycle
- Direct Known Subclasses:
- AtomicComponentExtension, CompositeComponentExtension, ReferenceExtension, ServiceExtension
public abstract class AbstractSCAObject
- extends AbstractLifecycle
- implements SCAObject
Functionality common to all SCAObject implementations
- Version:
- $Rev: 451895 $ $Date: 2006-10-01 23:58:18 -0700 (Sun, 01 Oct 2006) $
TRUE_FILTER
protected static final EventFilter TRUE_FILTER
listeners
protected Map<EventFilter,List<RuntimeEventListener>> listeners
parent
protected final CompositeComponent parent
AbstractSCAObject
public AbstractSCAObject(String name,
CompositeComponent parent)
getName
public String getName()
- Description copied from interface:
SCAObject
- Returns the artifact name
- Specified by:
getName
in interface SCAObject
getParent
public CompositeComponent getParent()
- Description copied from interface:
SCAObject
- Returns the parent composite, or null if the artifact does not have one
- Specified by:
getParent
in interface SCAObject
addListener
public void addListener(RuntimeEventListener listener)
- Description copied from interface:
EventPublisher
- Registers a listener to receive notifications for the context
- Specified by:
addListener
in interface EventPublisher
removeListener
public void removeListener(RuntimeEventListener listener)
- Description copied from interface:
EventPublisher
- Removes a previously registered listener
- Specified by:
removeListener
in interface EventPublisher
addListener
public void addListener(EventFilter filter,
RuntimeEventListener listener)
- Description copied from interface:
EventPublisher
- Registers a listener to receive notifications for the context
- Specified by:
addListener
in interface EventPublisher
publish
public void publish(Event event)
- Description copied from interface:
EventPublisher
- Publish an event
- Specified by:
publish
in interface EventPublisher
getListeners
protected Map<EventFilter,List<RuntimeEventListener>> getListeners()
prepare
public void prepare()
- Description copied from interface:
SCAObject
- Called to signal that the composite should perform and required steps prior to registration with its parent such
as wiring of its children
- Specified by:
prepare
in interface SCAObject
toString
public String toString()
- Description copied from class:
AbstractLifecycle
- Returns the current lifecycle as a String (for example, "RUNNING").
- Overrides:
toString
in class AbstractLifecycle
- Returns:
- the current lifecycle as a String
getExtensions
public Map<Object,Object> getExtensions()
- Description copied from interface:
SCAObject
- The extensions map contains other runtime context such as type systems for various databindings
- Specified by:
getExtensions
in interface SCAObject
- Returns:
- A live map of extended context
isSystem
public boolean isSystem()
- Description copied from interface:
SCAObject
- Returns true if the artifact is a system artifact
- Specified by:
isSystem
in interface SCAObject
- Returns:
- true if the artifact is a system artifact
-