Apache Tuscany SCA Kernel Sub-Project

org.apache.tuscany.spi.component
Interface Service

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

public interface Service
extends SCAObject

The runtime instantiation of an SCA service 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 createCallbackTargetInvoker(ServiceContract contract, Operation operation)
          Returns the target invoker for dispatching callback invocations
 ServiceContract<?> getBindingServiceContract()
          Get the ServiceContract for the binding
 WireInvocationHandler getHandler()
          Returns the handler responsible for flowing a request through the service
 InboundWire getInboundWire()
          Returns the inbound wire for flowing a request through the service
 Class<?> getInterface()
          Returns the service interface configured for the service
 OutboundWire getOutboundWire()
          Returns the outbound wire for flowing a request out of the service
 void setBindingServiceContract(ServiceContract<?> serviceContract)
          Set the ServiceContract for the binding.
 void setInboundWire(InboundWire wire)
          Sets the inbound wire for flowing a request through the service
 void setOutboundWire(OutboundWire wire)
          Sets the outbound wire for flowing a request out of the service
 
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

getHandler

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

Throws:
TargetException

getInterface

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


getInboundWire

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

Returns:
the inbound wire for flowing a request through the service

setInboundWire

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

Parameters:
wire - the inbound wire for flowing a request through the service

getOutboundWire

OutboundWire getOutboundWire()
Returns the outbound wire for flowing a request out of the service

Returns:
the outbound wire for flowing a request out of the service

setOutboundWire

void setOutboundWire(OutboundWire wire)
Sets the outbound wire for flowing a request out of the service

Parameters:
wire - the outbound wire for flowing a request out of the service

createCallbackTargetInvoker

TargetInvoker createCallbackTargetInvoker(ServiceContract contract,
                                          Operation operation)
Returns the target invoker for dispatching callback invocations

Parameters:
contract - the callback contract
operation - the callback operation the target invoker dispatches to

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 inbound wire. If not set, it will be the same as the ServideContract from the interface.

Parameters:
serviceContract -

Apache Tuscany SCA Kernel Sub-Project

-