org.apache.tuscany.core.extension
Class WireBuilderSupport<T extends ContextFactory<?>>
java.lang.Object
org.apache.tuscany.core.extension.WireBuilderSupport<T>
- All Implemented Interfaces:
- WireBuilder
public abstract class WireBuilderSupport<T extends ContextFactory<?>>
- extends java.lang.Object
- implements WireBuilder
A base class for WireBuilder
implementations
- Version:
- $$Rev$$ $$Date$$
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
runtimeContext
protected RuntimeContext runtimeContext
targetClass
protected java.lang.Class targetClass
WireBuilderSupport
public WireBuilderSupport()
setRuntimeContext
public void setRuntimeContext(RuntimeContext context)
init
public void init()
throws java.lang.Exception
- Throws:
java.lang.Exception
connect
public void connect(SourceWireFactory sourceFactory,
TargetWireFactory targetFactory,
java.lang.Class targetType,
boolean downScope,
ScopeContext targetScopeContext)
throws BuilderConfigException
- Description copied from interface:
WireBuilder
- Connects wire configurations of the source proxy factory to corresponding ones in the target proxy to
factory
- Specified by:
connect
in interface WireBuilder
- Parameters:
sourceFactory
- the proxy factory used in constructing the source side of the wire chaintargetFactory
- the proxy factory used in constructing the target side of the wire chaintargetType
- the context type of the target. Used to determine if a paricular wire builder should construct
the wiredownScope
- true if the component containing the reference (source side) is of a lesser scope than the
target servicetargetScopeContext
- the scope context responsible for managing intance contexts of the target component
type
- Throws:
BuilderConfigException
- if an error occurs during the wire buildSource process
completeTargetChain
public void completeTargetChain(TargetWireFactory targetFactory,
java.lang.Class targetType,
ScopeContext targetScopeContext)
throws BuilderConfigException
- Description copied from interface:
WireBuilder
- Finishes processing the target side wire chain. For example, a
TargetInvoker
used by target-side proxies is usually set during this
phase.
- Specified by:
completeTargetChain
in interface WireBuilder
- Parameters:
targetFactory
- the target-side proxy factorytargetType
- the target context typetargetScopeContext
- the target scope
- Throws:
BuilderConfigException
- if an error occurs during the wire buildSource process
createInvoker
protected abstract TargetInvoker createInvoker(QualifiedName targetName,
java.lang.reflect.Method operation,
ScopeContext context,
boolean downScope)
- Callback to create the specific
TargetInvoker
type for dispatching to the target type
- Parameters:
targetName
- the fully qualified name of the wire targetoperation
- the operation the invoker will be associated withcontext
- the scope context that manages the target contextdownScope
- whether the wire source scope is "longer" than the target
-