org.apache.tuscany.sca.assembly.impl
Class ComponentReferenceImpl

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
All Implemented Interfaces:
java.lang.Cloneable, AbstractContract, AbstractReference, Base, ComponentReference, Contract, Extensible, OperationsConfigurator, Reference, IntentAttachPoint, PolicySetAttachPoint
Direct Known Subclasses:
RuntimeComponentReferenceImpl

public class ComponentReferenceImpl
extends ReferenceImpl
implements ComponentReference, java.lang.Cloneable

Represents a component reference


Constructor Summary
protected ComponentReferenceImpl()
          Constructs a new component reference.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the contract.
 java.lang.Boolean getAutowire()
          Return the Boolean value of autowire
 ComponentService getCallbackService()
          Returns the callback service created internally as a target endpoint for callbacks to this reference.
 java.util.List<Endpoint> getEndpoints()
          Returns the endpoints implied by this reference.
 InterfaceContract getInterfaceContract(Binding binding)
          Use endpoint information to work out what the interface contract for the binding is.
 Reference getReference()
          Returns the reference defined by the implementation for this reference.
 boolean isAutowire()
           
 java.util.List<CompositeReference> promotedAs()
           
 void setAutowire(java.lang.Boolean autowire)
          Sets whether component references should be autowired.
 void setCallbackService(ComponentService callbackService)
          Sets the callback service created internally as a target endpoint for callbacks to this reference.
 void setReference(Reference reference)
          Sets the reference defined by the implementation for this reference.
 
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, toString, wait, wait, wait
 
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, 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

ComponentReferenceImpl

protected ComponentReferenceImpl()
Constructs a new component reference.

Method Detail

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 ReferenceImpl
Returns:
a clone of the reference
Throws:
java.lang.CloneNotSupportedException

getReference

public Reference getReference()
Description copied from interface: ComponentReference
Returns the reference defined by the implementation for this reference.

Specified by:
getReference in interface ComponentReference
Returns:
the implementation reference

setReference

public void setReference(Reference reference)
Description copied from interface: ComponentReference
Sets the reference defined by the implementation for this reference.

Specified by:
setReference in interface ComponentReference
Parameters:
reference - the implementation reference

isAutowire

public boolean isAutowire()

setAutowire

public void setAutowire(java.lang.Boolean autowire)
Description copied from interface: ComponentReference
Sets whether component references should be autowired.

Specified by:
setAutowire in interface ComponentReference
Parameters:
autowire - whether component references should be autowired

getAutowire

public java.lang.Boolean getAutowire()
Description copied from interface: ComponentReference
Return the Boolean value of autowire

Specified by:
getAutowire in interface ComponentReference
Returns:
null/TRUE/FALSE

promotedAs

public java.util.List<CompositeReference> promotedAs()

getCallbackService

public ComponentService getCallbackService()
Description copied from interface: ComponentReference
Returns the callback service created internally as a target endpoint for callbacks to this reference.

Specified by:
getCallbackService in interface ComponentReference
Returns:
the callback service

setCallbackService

public void setCallbackService(ComponentService callbackService)
Description copied from interface: ComponentReference
Sets the callback service created internally as a target endpoint for callbacks to this reference.

Specified by:
setCallbackService in interface ComponentReference
Parameters:
callbackService - the callback service

getEndpoints

public java.util.List<Endpoint> getEndpoints()
Description copied from interface: ComponentReference
Returns the endpoints implied by this reference.

Specified by:
getEndpoints in interface ComponentReference
Returns:
the endpoints implied by this reference

getInterfaceContract

public InterfaceContract getInterfaceContract(Binding binding)
Use endpoint information to work out what the interface contract for the binding is.

Specified by:
getInterfaceContract in interface Contract
Overrides:
getInterfaceContract in class ReferenceImpl
Parameters:
binding - the binding for which the interface contract is required
Returns:
the interface contract