|
Apache Tuscany SCA Kernel Sub-Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tuscany.spi.AbstractLifecycle
org.apache.tuscany.spi.component.AbstractSCAObject
org.apache.tuscany.spi.extension.ReferenceExtension
public abstract class ReferenceExtension
The default implementation of an SCA reference
Field Summary | |
---|---|
protected ServiceContract<?> |
bindingServiceContract
|
protected InboundWire |
inboundWire
|
protected OutboundWire |
outboundWire
|
protected Class<?> |
referenceInterface
|
protected WireService |
wireService
|
Fields inherited from class org.apache.tuscany.spi.component.AbstractSCAObject |
---|
listeners, parent, TRUE_FILTER |
Fields inherited from class org.apache.tuscany.spi.AbstractLifecycle |
---|
lifecycleState |
Fields inherited from interface org.apache.tuscany.spi.Lifecycle |
---|
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, STOPPED, STOPPING, UNINITIALIZED |
Constructor Summary | |
---|---|
protected |
ReferenceExtension(String name,
Class<?> referenceInterface,
CompositeComponent parent,
WireService wireService)
|
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 |
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 |
Scope |
getScope()
Returns the artifact scope |
Object |
getServiceInstance()
Returns an instance associated with the default 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 reference |
void |
setOutboundWire(OutboundWire outboundWire)
Sets the outbound wire used by the reference to connect to a target |
Methods inherited from class org.apache.tuscany.spi.component.AbstractSCAObject |
---|
addListener, addListener, getExtensions, getListeners, getName, getParent, isSystem, prepare, publish, removeListener, toString |
Methods inherited from class org.apache.tuscany.spi.AbstractLifecycle |
---|
getLifecycleState, setLifecycleState, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.tuscany.spi.component.Reference |
---|
createTargetInvoker |
Methods inherited from interface org.apache.tuscany.spi.component.SCAObject |
---|
getExtensions, getName, getParent, 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 |
Field Detail |
---|
protected InboundWire inboundWire
protected OutboundWire outboundWire
protected Class<?> referenceInterface
protected WireService wireService
protected ServiceContract<?> bindingServiceContract
Constructor Detail |
---|
protected ReferenceExtension(String name, Class<?> referenceInterface, CompositeComponent parent, WireService wireService)
Method Detail |
---|
public Scope getScope()
SCAObject
getScope
in interface SCAObject
public void setInboundWire(InboundWire wire)
Reference
setInboundWire
in interface Reference
public InboundWire getInboundWire()
Reference
getInboundWire
in interface Reference
public OutboundWire getOutboundWire()
Reference
getOutboundWire
in interface Reference
public void setOutboundWire(OutboundWire outboundWire)
Reference
setOutboundWire
in interface Reference
public Class<?> getInterface()
Reference
getInterface
in interface Reference
public Object getServiceInstance() throws TargetException
SCAObject
getServiceInstance
in interface SCAObject
TargetException
- if an error occurs retrieving the instancepublic WireInvocationHandler getHandler() throws TargetException
Reference
getHandler
in interface Reference
TargetException
public TargetInvoker createCallbackTargetInvoker(ServiceContract contract, Operation operation)
Reference
createCallbackTargetInvoker
in interface Reference
public TargetInvoker createAsyncTargetInvoker(OutboundWire wire, Operation operation)
Reference
TargetInvoker
which issues a non-blocking dispatch
createAsyncTargetInvoker
in interface Reference
wire
- the outbound wire of the invocation source, used for callbacksoperation
- the operation to invokepublic ServiceContract<?> getBindingServiceContract()
Reference
getBindingServiceContract
in interface Reference
public void setBindingServiceContract(ServiceContract<?> serviceContract)
Reference
setBindingServiceContract
in interface Reference
|
Apache Tuscany SCA Kernel Sub-Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |