org.apache.tuscany.sca.core.assembly
Class RuntimeComponentImpl

java.lang.Object
  extended by org.apache.tuscany.sca.assembly.impl.BaseImpl
      extended by org.apache.tuscany.sca.assembly.impl.ExtensibleImpl
          extended by org.apache.tuscany.sca.assembly.impl.ComponentImpl
              extended by org.apache.tuscany.sca.core.assembly.RuntimeComponentImpl
All Implemented Interfaces:
java.lang.Cloneable, Base, Component, Extensible, OperationsConfigurator, ResolverExtension, ScopedRuntimeComponent, IntentAttachPoint, PolicySetAttachPoint, RuntimeComponent

public class RuntimeComponentImpl
extends ComponentImpl
implements RuntimeComponent, ScopedRuntimeComponent, ResolverExtension


Field Summary
protected  RuntimeComponentContext componentContext
           
protected  ImplementationProvider implementationProvider
           
protected  ModelResolver modelResolver
           
protected  java.util.List<PolicyProvider> policyProviders
           
protected  ScopeContainer scopeContainer
           
protected  boolean started
           
 
Constructor Summary
RuntimeComponentImpl()
           
 
Method Summary
 void addPolicyProvider(PolicyProvider policyProvider)
          Add a policy provider to the component
 RuntimeComponentContext getComponentContext()
          Get the associated component context
 ImplementationProvider getImplementationProvider()
          Get the implementation-specific configuration for this component
 ModelResolver getModelResolver()
          Returns the model resolver for the models representing the artifacts visible in the scope of this contribution.
 java.util.List<PolicyProvider> getPolicyProviders()
          Get a list of policy providers configured for this component
 ScopeContainer getScopeContainer()
          Get the assoicated scope container
 boolean isStarted()
          Tests if the RuntimeComponent is started
 void setComponentContext(RuntimeComponentContext componentContext)
          Set the associated component context
 void setImplementationProvider(ImplementationProvider provider)
          Set the implementation-specific configuration for this component
 void setModelResolver(ModelResolver modelResolver)
          Sets the model resolver for the models representing the artifacts visible in the scope of this contribution.
 void setScopeContainer(ScopeContainer scopeContainer)
          Set the associated scope container
 void setStarted(boolean started)
          Sets the RuntimeComponent started state
 java.lang.String toString()
           
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.ComponentImpl
clone, getApplicablePolicySets, getAutowire, getConfiguredOperations, getConstrainingType, getImplementation, getName, getPolicySets, getProperties, getReferences, getRequiredIntents, getServices, getType, getURI, isAutowire, setAutowire, setConfiguredOperations, setConstrainingType, setImplementation, setName, setPolicySets, setRequiredIntents, setType, setURI
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.ExtensibleImpl
getExtensions
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.BaseImpl
isUnresolved, setUnresolved
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tuscany.sca.assembly.Component
clone, getAutowire, getConstrainingType, getImplementation, getName, getProperties, getReferences, getServices, getURI, setAutowire, setConstrainingType, setImplementation, setName, setURI
 
Methods inherited from interface org.apache.tuscany.sca.assembly.Base
isUnresolved, setUnresolved
 
Methods inherited from interface org.apache.tuscany.sca.assembly.Extensible
getExtensions
 
Methods inherited from interface org.apache.tuscany.sca.policy.PolicySetAttachPoint
getApplicablePolicySets, getPolicySets
 
Methods inherited from interface org.apache.tuscany.sca.policy.IntentAttachPoint
getRequiredIntents, getType, setType
 

Field Detail

componentContext

protected RuntimeComponentContext componentContext

implementationProvider

protected ImplementationProvider implementationProvider

policyProviders

protected java.util.List<PolicyProvider> policyProviders

scopeContainer

protected ScopeContainer scopeContainer

started

protected boolean started

modelResolver

protected ModelResolver modelResolver
Constructor Detail

RuntimeComponentImpl

public RuntimeComponentImpl()
Method Detail

getImplementationProvider

public ImplementationProvider getImplementationProvider()
Description copied from interface: RuntimeComponent
Get the implementation-specific configuration for this component

Specified by:
getImplementationProvider in interface RuntimeComponent
Returns:
The implementation provider for this component

setImplementationProvider

public void setImplementationProvider(ImplementationProvider provider)
Description copied from interface: RuntimeComponent
Set the implementation-specific configuration for this component

Specified by:
setImplementationProvider in interface RuntimeComponent
Parameters:
provider - The object that manages the component implementation

getScopeContainer

public ScopeContainer getScopeContainer()
Description copied from interface: ScopedRuntimeComponent
Get the assoicated scope container

Specified by:
getScopeContainer in interface ScopedRuntimeComponent
Returns:

setScopeContainer

public void setScopeContainer(ScopeContainer scopeContainer)
Description copied from interface: ScopedRuntimeComponent
Set the associated scope container

Specified by:
setScopeContainer in interface ScopedRuntimeComponent

isStarted

public boolean isStarted()
Description copied from interface: RuntimeComponent
Tests if the RuntimeComponent is started

Specified by:
isStarted in interface RuntimeComponent
Returns:
true if the RuntimeComponent is started otherwise false

setStarted

public void setStarted(boolean started)
Description copied from interface: RuntimeComponent
Sets the RuntimeComponent started state

Specified by:
setStarted in interface RuntimeComponent
Parameters:
started - the state to set

getComponentContext

public RuntimeComponentContext getComponentContext()
Description copied from interface: RuntimeComponent
Get the associated component context

Specified by:
getComponentContext in interface RuntimeComponent
Returns:
the componentContext

setComponentContext

public void setComponentContext(RuntimeComponentContext componentContext)
Description copied from interface: RuntimeComponent
Set the associated component context

Specified by:
setComponentContext in interface RuntimeComponent
Parameters:
componentContext - the componentContext to set

addPolicyProvider

public void addPolicyProvider(PolicyProvider policyProvider)
Description copied from interface: RuntimeComponent
Add a policy provider to the component

Specified by:
addPolicyProvider in interface RuntimeComponent

getPolicyProviders

public java.util.List<PolicyProvider> getPolicyProviders()
Description copied from interface: RuntimeComponent
Get a list of policy providers configured for this component

Specified by:
getPolicyProviders in interface RuntimeComponent
Returns:

getModelResolver

public ModelResolver getModelResolver()
Description copied from interface: ResolverExtension
Returns the model resolver for the models representing the artifacts visible in the scope of this contribution.

Specified by:
getModelResolver in interface ResolverExtension
Returns:
The model resolver

setModelResolver

public void setModelResolver(ModelResolver modelResolver)
Description copied from interface: ResolverExtension
Sets the model resolver for the models representing the artifacts visible in the scope of this contribution.

Specified by:
setModelResolver in interface ResolverExtension
Parameters:
modelResolver - The model resolver

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object