|
Apache Tuscany SCA Kernel Sub-Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CompositeComponent
The runtime instantiation of an SCA composite component. Composites may contain child components, offer services, and have references. Children are contained in two namespaces, an application namespace for end-user components deployed to a runtime, and a system namespace for components that provide system services.
Field Summary |
---|
Fields inherited from interface org.apache.tuscany.spi.Lifecycle |
---|
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, STOPPED, STOPPING, UNINITIALIZED |
Method Summary | ||
---|---|---|
SCAObject |
getChild(String name)
Returns the child associated with a given name |
|
List<SCAObject> |
getChildren()
Returns the children contained by the composite |
|
Document |
getPropertyValue(String name)
Returns the value of a Property of this composite. |
|
List<Reference> |
getReferences()
Returns the references contained by the composite |
|
Service |
getService(String name)
Returns the service associated with the given name |
|
List<Service> |
getServices()
Returns the services contained by the composite |
|
SCAObject |
getSystemChild(String name)
Returns the system child associated with a given name |
|
List<SCAObject> |
getSystemChildren()
Returns the system children contained by the composite |
|
List<Reference> |
getSystemReferences()
Returns the system references contained by the composite |
|
Service |
getSystemService(String name)
Returns the system service associated with the given name |
|
Object |
getSystemServiceInstance(String name)
Returns a system service associated with the given name |
|
List<Service> |
getSystemServices()
Returns the system services contained by the composite |
|
|
locateService(Class<T> serviceInterface,
String serviceName)
Returns the service instance for associated with the child registered for the given name |
|
|
locateSystemService(Class<T> serviceInterface,
String serviceName)
Returns the system service instance for associated with the child registered for the given name |
|
void |
register(SCAObject context)
Registers a child of this composite. |
|
|
registerJavaObject(String name,
Class<S> service,
I instance)
Register a simple Java Object as a system component. |
|
|
resolveExternalInstance(Class<T> instanceInterface)
Invoked by a parent component to return an autowire target in a child. |
|
|
resolveInstance(Class<T> instanceInterface)
Invoked by child components to return an an autowire target. |
|
|
resolveSystemExternalInstance(Class<T> instanceInterface)
Invoked by a parent component to return a system autowire target in a child. |
|
|
resolveSystemInstance(Class<T> instanceInterface)
Invoked by system child components to return an an autowire target. |
|
void |
setScopeContainer(ScopeContainer scopeContainer)
|
Methods inherited from interface org.apache.tuscany.spi.component.Component |
---|
addInboundWire, addOutboundWire, addOutboundWires, createAsyncTargetInvoker, createTargetInvoker, getInboundWire, getInboundWires, getOutboundWires, getServiceInstance, getServiceInterfaces |
Methods inherited from interface org.apache.tuscany.spi.component.SCAObject |
---|
getExtensions, getName, getParent, getScope, 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, start, stop |
Methods inherited from interface org.apache.tuscany.spi.event.RuntimeEventListener |
---|
onEvent |
Method Detail |
---|
void register(SCAObject context) throws InvalidComponentTypeException
context
- the context to add as a child
InvalidComponentTypeException
<S,I extends S> void registerJavaObject(String name, Class<S> service, I instance) throws ObjectRegistrationException
name
- the name of the resulting componentservice
- the service interface the component should exposeinstance
- the Object that will become the component's implementation
ObjectRegistrationException
SCAObject getChild(String name)
SCAObject getSystemChild(String name)
List<SCAObject> getChildren()
List<SCAObject> getSystemChildren()
List<Service> getServices()
List<Service> getSystemServices()
Service getService(String name) throws ComponentNotFoundException
ComponentNotFoundException
Service getSystemService(String name) throws ComponentNotFoundException
ComponentNotFoundException
Object getSystemServiceInstance(String name) throws TargetException
TargetException
- if an error occurs retrieving the service instanceList<Reference> getReferences()
List<Reference> getSystemReferences()
<T> T locateService(Class<T> serviceInterface, String serviceName)
<T> T locateSystemService(Class<T> serviceInterface, String serviceName)
void setScopeContainer(ScopeContainer scopeContainer)
scopeContainer
- Document getPropertyValue(String name)
name
- the name of the Property
<T> T resolveInstance(Class<T> instanceInterface) throws AutowireResolutionException
instanceInterface
- the type of service being requested
AutowireResolutionException
- if an error occurs attempting to resolve an autowire<T> T resolveSystemInstance(Class<T> instanceInterface) throws AutowireResolutionException
instanceInterface
- the type of service being requested
AutowireResolutionException
- if an error occurs attempting to resolve an autowire<T> T resolveExternalInstance(Class<T> instanceInterface) throws AutowireResolutionException
#resolveInstance(Class)
on P, which in turn could invoke the present method on B in order to resolve a
target.
instanceInterface
- the type of service being requested
AutowireResolutionException
- if an error occurs attempting to resolve an autowire<T> T resolveSystemExternalInstance(Class<T> instanceInterface) throws AutowireResolutionException
#resolveInstance(Class)
on P, which in turn could invoke the present method on B in order to resolve a
target.
instanceInterface
- the type of service being requested
AutowireResolutionException
- if an error occurs attempting to resolve an autowire
|
Apache Tuscany SCA Kernel Sub-Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |