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

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.ContractImpl
              extended by org.apache.tuscany.sca.assembly.impl.AbstractReferenceImpl
                  extended by org.apache.tuscany.sca.assembly.impl.ReferenceImpl
                      extended by org.apache.tuscany.sca.assembly.impl.ComponentReferenceImpl
                          extended by org.apache.tuscany.sca.core.assembly.RuntimeComponentReferenceImpl
All Implemented Interfaces:
java.lang.Cloneable, AbstractContract, AbstractReference, Base, ComponentReference, Contract, Extensible, OperationsConfigurator, Reference, IntentAttachPoint, PolicySetAttachPoint, RuntimeComponentReference

public class RuntimeComponentReferenceImpl
extends ComponentReferenceImpl
implements RuntimeComponentReference

Implementation of a Component Reference.


Constructor Summary
RuntimeComponentReferenceImpl()
           
 
Method Summary
 void addPolicyProvider(Binding binding, PolicyProvider policyProvider)
          Add a policy provider for the given binding to the reference
 java.lang.Object clone()
          Returns a clone of the contract.
 ReferenceBindingProvider getBindingProvider(Binding binding)
          Returns the reference binding provider associated with this component reference and the given binding.
 RuntimeComponent getComponent()
           
 EndpointResolver getEndpointResolver(Endpoint endpoint)
          Returns the endpoint resolver associated with this component reference and the given endpoint.
 Invoker getInvoker(Binding binding, Operation operation)
          Get the invoker for the given binding and operation
 java.util.List<PolicyProvider> getPolicyProviders(Binding binding)
          Get a list of policy providers for the given binding
 RuntimeWire getRuntimeWire(Binding binding)
          Get the runtime wire for the given binding
 java.util.List<RuntimeWire> getRuntimeWires()
          Get a list of runtime wires to the reference
 void setBindingProvider(Binding binding, ReferenceBindingProvider bindingProvider)
          Sets the reference binding provider associated with this component reference and the given binding.
 void setComponent(RuntimeComponent component)
          Set the owning component
 void setEndpointResolver(Endpoint endpoint, EndpointResolver endpointResolver)
          Sets the endpoint resolver associated with this component reference and the given endpoint.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.ComponentReferenceImpl
getAutowire, getCallbackService, getEndpoints, getInterfaceContract, getReference, isAutowire, promotedAs, setAutowire, setCallbackService, setReference
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.ReferenceImpl
getApplicablePolicySets, getBinding, getBindings, getCallback, getCallbackBinding, getPolicySets, getTargets, isPromotionOverride, isWiredByImpl, setCallback, setPolicySets, setPromotionOverride, setWiredByImpl
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.AbstractReferenceImpl
getMultiplicity, setMultiplicity
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.ContractImpl
getConfiguredOperations, getInterfaceContract, getName, getRequiredIntents, getType, isCallback, setConfiguredOperations, setInterfaceContract, setIsCallback, setName, setRequiredIntents, setType
 
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.ComponentReference
getAutowire, getCallbackService, getEndpoints, getReference, setAutowire, setCallbackService, setReference
 
Methods inherited from interface org.apache.tuscany.sca.assembly.Reference
getTargets, isPromotionOverride, isWiredByImpl, setPromotionOverride, setWiredByImpl
 
Methods inherited from interface org.apache.tuscany.sca.assembly.AbstractReference
getMultiplicity, setMultiplicity
 
Methods inherited from interface org.apache.tuscany.sca.assembly.Contract
getBinding, getBindings, getCallback, getCallbackBinding, getInterfaceContract, setCallback
 
Methods inherited from interface org.apache.tuscany.sca.assembly.AbstractContract
getInterfaceContract, getName, isCallback, setInterfaceContract, setIsCallback, setName
 
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.assembly.OperationsConfigurator
getConfiguredOperations
 
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
 

Constructor Detail

RuntimeComponentReferenceImpl

public RuntimeComponentReferenceImpl()
Method Detail

getRuntimeWires

public java.util.List<RuntimeWire> getRuntimeWires()
Description copied from interface: RuntimeComponentReference
Get a list of runtime wires to the reference

Specified by:
getRuntimeWires in interface RuntimeComponentReference
Returns:
The list of wires

getRuntimeWire

public RuntimeWire getRuntimeWire(Binding binding)
Description copied from interface: RuntimeComponentReference
Get the runtime wire for the given binding

Specified by:
getRuntimeWire in interface RuntimeComponentReference
Parameters:
binding - The assembly model binding
Returns:
The runtime wire

getBindingProvider

public ReferenceBindingProvider getBindingProvider(Binding binding)
Description copied from interface: RuntimeComponentReference
Returns the reference binding provider associated with this component reference and the given binding.

Specified by:
getBindingProvider in interface RuntimeComponentReference
Parameters:
binding - The assembly model binding
Returns:
The runtime reference binding provider

setBindingProvider

public void setBindingProvider(Binding binding,
                               ReferenceBindingProvider bindingProvider)
Description copied from interface: RuntimeComponentReference
Sets the reference binding provider associated with this component reference and the given binding.

Specified by:
setBindingProvider in interface RuntimeComponentReference
Parameters:
binding - The assembly model binding
bindingProvider - The runtime reference binding provider

getEndpointResolver

public EndpointResolver getEndpointResolver(Endpoint endpoint)
Description copied from interface: RuntimeComponentReference
Returns the endpoint resolver associated with this component reference and the given endpoint.

Specified by:
getEndpointResolver in interface RuntimeComponentReference
Returns:
The enpoint resolver

setEndpointResolver

public void setEndpointResolver(Endpoint endpoint,
                                EndpointResolver endpointResolver)
Description copied from interface: RuntimeComponentReference
Sets the endpoint resolver associated with this component reference and the given endpoint.

Specified by:
setEndpointResolver in interface RuntimeComponentReference

getInvoker

public Invoker getInvoker(Binding binding,
                          Operation operation)
Description copied from interface: RuntimeComponentReference
Get the invoker for the given binding and operation

Specified by:
getInvoker in interface RuntimeComponentReference
Parameters:
binding - The assembly model binding
operation - The assembly model operation
Returns:
The runtime Invoker

getComponent

public RuntimeComponent getComponent()
Returns:
the component

setComponent

public void setComponent(RuntimeComponent component)
Description copied from interface: RuntimeComponentReference
Set the owning component

Specified by:
setComponent in interface RuntimeComponentReference
Parameters:
component - the component to set

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from interface: Contract
Returns a clone of the contract.

Specified by:
clone in interface Contract
Overrides:
clone in class ComponentReferenceImpl
Returns:
a clone of the reference
Throws:
java.lang.CloneNotSupportedException
See Also:
ComponentReferenceImpl.clone()

addPolicyProvider

public void addPolicyProvider(Binding binding,
                              PolicyProvider policyProvider)
Description copied from interface: RuntimeComponentReference
Add a policy provider for the given binding to the reference

Specified by:
addPolicyProvider in interface RuntimeComponentReference
Parameters:
binding - The assembly model binding
policyProvider - The policy handler

getPolicyProviders

public java.util.List<PolicyProvider> getPolicyProviders(Binding binding)
Description copied from interface: RuntimeComponentReference
Get a list of policy providers for the given binding

Specified by:
getPolicyProviders in interface RuntimeComponentReference
Parameters:
binding - The assembly model binding
Returns:
A list of policy providers for the given binding

toString

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