Apache Tuscany SCA Kernel Sub-Project

org.apache.tuscany.spi.component
Interface Reference

All Superinterfaces:
EventPublisher, Lifecycle, SCAObject
All Known Implementing Classes:
ReferenceExtension

public interface Reference
extends SCAObject

Manages an SCA reference configured with a binding

Version:
$Rev: 449517 $ $Date: 2006-09-24 15:42:18 -0700 (Sun, 24 Sep 2006) $

Field Summary
 
Fields inherited from interface org.apache.tuscany.spi.Lifecycle
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, STOPPED, STOPPING, UNINITIALIZED
 
Method Summary
 TargetInvoker createAsyncTargetInvoker(OutboundWire wire, Operation operation)
          Callback to create a TargetInvoker which issues a non-blocking dispatch
 TargetInvoker createCallbackTargetInvoker(ServiceContract contract, Operation operation)
          Creates a target invoker for callbacks
 TargetInvoker createTargetInvoker(ServiceContract contract, Operation operation)
          Callback to create a TargetInvoker which dispatches to the target service of the reference
 ServiceContract<?> getBindingServiceContract()
          Get the ServiceContract for the binding
 WireInvocationHandler getHandler()
          Returns the handler responsible for flowing a request through the reference
 InboundWire getInboundWire()
          Returns the inbound wire for flowing a request through the reference
 Class<?> getInterface()
          Returns the service interface configured for the reference
 OutboundWire getOutboundWire()
          Returns the outbound wire used by the reference to connect to a target
 void setBindingServiceContract(ServiceContract<?> serviceContract)
          Set the ServiceContract for the binding.
 void setInboundWire(InboundWire wire)
          Sets the inbound wire for flowing a request through the reference
 void setOutboundWire(OutboundWire wire)
          Sets the outbound wire used by the reference to connect to a target
 
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
 

Method Detail

getInterface

Class<?> getInterface()
Returns the service interface configured for the reference


getHandler

WireInvocationHandler getHandler()
                                 throws TargetException
Returns the handler responsible for flowing a request through the reference

Throws:
TargetException

getInboundWire

InboundWire getInboundWire()
Returns the inbound wire for flowing a request through the reference


setInboundWire

void setInboundWire(InboundWire wire)
Sets the inbound wire for flowing a request through the reference


getOutboundWire

OutboundWire getOutboundWire()
Returns the outbound wire used by the reference to connect to a target


setOutboundWire

void setOutboundWire(OutboundWire wire)
Sets the outbound wire used by the reference to connect to a target


createTargetInvoker

TargetInvoker createTargetInvoker(ServiceContract contract,
                                  Operation operation)
Callback to create a TargetInvoker which dispatches to the target service of the reference

Parameters:
contract - the service contract to invoke on
operation - the operation to invoke

createCallbackTargetInvoker

TargetInvoker createCallbackTargetInvoker(ServiceContract contract,
                                          Operation operation)
Creates a target invoker for callbacks


createAsyncTargetInvoker

TargetInvoker createAsyncTargetInvoker(OutboundWire wire,
                                       Operation operation)
Callback to create a TargetInvoker which issues a non-blocking dispatch

Parameters:
wire - the outbound wire of the invocation source, used for callbacks
operation - the operation to invoke

getBindingServiceContract

ServiceContract<?> getBindingServiceContract()
Get the ServiceContract for the binding

Returns:

setBindingServiceContract

void setBindingServiceContract(ServiceContract<?> serviceContract)
Set the ServiceContract for the binding. This contract will be used for the outbound wire. If not set, it will be the same as the ServideContract from the interface.

Parameters:
serviceContract -

Apache Tuscany SCA Kernel Sub-Project

-