|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tuscany.core.extension.ExternalServiceContextFactory
public abstract class ExternalServiceContextFactory
A template implementation that creates instances of ExternalServiceContext
configured with the appropriate wire chains and bindings. This class is intended to be subclassed when
contributing new bindings to the runtime. The subclass serves as a marker so the binding WireBuilder
responsible for setting the proper TargetInvoker
on the wire chains
can be notified.
Constructor Summary | |
---|---|
ExternalServiceContextFactory(String name,
ObjectFactory objectFactory)
|
Method Summary | |
---|---|
void |
addProperty(String propertyName,
Object value)
Adds a property to the context |
void |
addSourceWireFactories(String referenceName,
Class referenceInterface,
List<SourceWireFactory> factory,
boolean multiplicity)
Adds a set of source-side wire factories for the given reference. |
void |
addSourceWireFactory(String referenceName,
SourceWireFactory factory)
Adds a source-side wire factory for the given reference. |
void |
addTargetWireFactory(String serviceName,
TargetWireFactory factory)
Adds a target-side wire factory for the given service name. |
ExternalServiceContext |
createContext()
Creates a Context based on configuration supplied by a logical model assembly |
String |
getName()
Returns the name of the Context produced by the current factory |
Scope |
getScope()
Returns the scope identifier associated with the type of contexts produced by the current factory |
List<SourceWireFactory> |
getSourceWireFactories()
Returns a collection of source-side wire factories for references. |
Map<String,TargetWireFactory> |
getTargetWireFactories()
Returns a collection of target-side wire factories keyed by service name |
TargetWireFactory |
getTargetWireFactory(String serviceName)
Returns the target-side wire factory associated with the given service name |
void |
prepare()
|
void |
prepare(CompositeContext parent)
Called to signal to the configuration that its parent context has been activated and that it shoud perform any required initialization steps |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExternalServiceContextFactory(String name, ObjectFactory objectFactory)
Method Detail |
---|
public ExternalServiceContext createContext() throws ContextCreationException
ContextFactory
Context
based on configuration supplied by a logical model assembly
createContext
in interface ContextFactory<ExternalServiceContext>
ContextCreationException
- if an error occurs creating the contextpublic Scope getScope()
ContextFactory
getScope
in interface ContextFactory<ExternalServiceContext>
public String getName()
ContextFactory
Context
produced by the current factory
getName
in interface ContextFactory<ExternalServiceContext>
public void prepare()
public void addTargetWireFactory(String serviceName, TargetWireFactory factory)
ContextFactory
addTargetWireFactory
in interface ContextFactory<ExternalServiceContext>
public TargetWireFactory getTargetWireFactory(String serviceName)
ContextFactory
getTargetWireFactory
in interface ContextFactory<ExternalServiceContext>
public Map<String,TargetWireFactory> getTargetWireFactories()
ContextFactory
getTargetWireFactories
in interface ContextFactory<ExternalServiceContext>
public void addSourceWireFactory(String referenceName, SourceWireFactory factory)
ContextFactory
addSourceWireFactory
in interface ContextFactory<ExternalServiceContext>
public void addSourceWireFactories(String referenceName, Class referenceInterface, List<SourceWireFactory> factory, boolean multiplicity)
ContextFactory
addSourceWireFactories
in interface ContextFactory<ExternalServiceContext>
public List<SourceWireFactory> getSourceWireFactories()
ContextFactory
getSourceWireFactories
in interface ContextFactory<ExternalServiceContext>
public void addProperty(String propertyName, Object value)
ContextFactory
addProperty
in interface ContextFactory<ExternalServiceContext>
public void prepare(CompositeContext parent)
ContextFactory
prepare
in interface ContextFactory<ExternalServiceContext>
parent
- the parent context
|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |