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

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.AbstractServiceImpl
                  extended by org.apache.tuscany.sca.assembly.impl.ServiceImpl
                      extended by org.apache.tuscany.sca.assembly.impl.ComponentServiceImpl
                          extended by org.apache.tuscany.sca.core.assembly.RuntimeComponentServiceImpl
All Implemented Interfaces:
java.lang.Cloneable, AbstractContract, AbstractService, Base, ComponentService, Contract, Extensible, OperationsConfigurator, Service, IntentAttachPoint, PolicySetAttachPoint, RuntimeComponentService

public class RuntimeComponentServiceImpl
extends ComponentServiceImpl
implements RuntimeComponentService

Implementation of a Component Service.


Constructor Summary
RuntimeComponentServiceImpl()
           
 
Method Summary
 void addPolicyProvider(Binding binding, PolicyProvider policyProvider)
          Add a policy provider for the given binding to the service
 java.lang.Object clone()
          Returns a clone of the contract.
 ServiceBindingProvider getBindingProvider(Binding binding)
          Returns the service binding provider associated with this component service and the given binding.
 java.util.List<RuntimeWire> getCallbackWires()
          Get the callback wires associated with this service
 InvocationChain getInvocationChain(Binding binding, InterfaceContract interfaceContract, Operation operation)
          Get the invocation chain for the given binding and operation
 InvocationChain getInvocationChain(Binding binding, Operation operation)
          Get the invocation chain for the given binding and operation
 Invoker getInvoker(Binding binding, InterfaceContract interfaceContract, Operation operation)
          Get the invoker for the given binding and operation
 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
 RuntimeWire getRuntimeWire(Binding binding, InterfaceContract interfaceContract)
          Returns the service binding provider associated with this component service and the given binding.
 java.util.List<RuntimeWire> getRuntimeWires()
          Get a list of runtime wires to the service
 void setBindingProvider(Binding binding, ServiceBindingProvider bindingProvider)
          Sets the service binding provider associated with this component service and the given binding.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.ComponentServiceImpl
getCallbackReference, getService, promotedAs, setCallbackReference, setService
 
Methods inherited from class org.apache.tuscany.sca.assembly.impl.ServiceImpl
getApplicablePolicySets, getBinding, getBindings, getCallback, getCallbackBinding, getInterfaceContract, getPolicySets, setCallback, setPolicySets
 
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.ComponentService
getCallbackReference, getService, setCallbackReference, setService
 
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

RuntimeComponentServiceImpl

public RuntimeComponentServiceImpl()
Method Detail

getRuntimeWires

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

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

getRuntimeWire

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

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

getRuntimeWire

public RuntimeWire getRuntimeWire(Binding binding,
                                  InterfaceContract interfaceContract)
Description copied from interface: RuntimeComponentService
Returns the service binding provider associated with this component service and the given binding.

Specified by:
getRuntimeWire in interface RuntimeComponentService
Returns:

getCallbackWires

public java.util.List<RuntimeWire> getCallbackWires()
Description copied from interface: RuntimeComponentService
Get the callback wires associated with this service

Specified by:
getCallbackWires in interface RuntimeComponentService
Returns:
The list of runtime callback wires

getBindingProvider

public ServiceBindingProvider getBindingProvider(Binding binding)
Description copied from interface: RuntimeComponentService
Returns the service binding provider associated with this component service and the given binding.

Specified by:
getBindingProvider in interface RuntimeComponentService
Parameters:
binding - The assembly model binding
Returns:
The runtime service binding provider

setBindingProvider

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

Specified by:
setBindingProvider in interface RuntimeComponentService
Parameters:
binding - The assembly model binding
bindingProvider - The runtime service binding provider

getInvoker

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

Specified by:
getInvoker in interface RuntimeComponentService
Parameters:
binding - The assembly model binding
operation - The assembly model operation
Returns:
The runtime invoker

getInvoker

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

Specified by:
getInvoker in interface RuntimeComponentService
Parameters:
binding - The assembly model binding
interfaceContract - the client interface contract
operation - The assembly model operation
Returns:
The runtime invoker

getInvocationChain

public InvocationChain getInvocationChain(Binding binding,
                                          InterfaceContract interfaceContract,
                                          Operation operation)
Description copied from interface: RuntimeComponentService
Get the invocation chain for the given binding and operation

Specified by:
getInvocationChain in interface RuntimeComponentService
Parameters:
binding - The assembly model binding
interfaceContract - the client interface contract
operation - The assembly model operation
Returns:
The runtime invocation chain

getInvocationChain

public InvocationChain getInvocationChain(Binding binding,
                                          Operation operation)
Description copied from interface: RuntimeComponentService
Get the invocation chain for the given binding and operation

Specified by:
getInvocationChain in interface RuntimeComponentService
Parameters:
binding - The assembly model binding
operation - The assembly model operation
Returns:
The runtime invocation chain

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 ComponentServiceImpl
Returns:
a clone of the reference
Throws:
java.lang.CloneNotSupportedException
See Also:
ComponentServiceImpl.clone()

addPolicyProvider

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

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

getPolicyProviders

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

Specified by:
getPolicyProviders in interface RuntimeComponentService
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