|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tuscany.core.system.config.SystemObjectContextFactory
public class SystemObjectContextFactory
A ContextFactory that contains the configuration needed to convert a simple Java Object into a component. The object is assumed to be fully initialized and will always be added with MODULE scope.
Constructor Summary | |
---|---|
SystemObjectContextFactory(String name,
Object instance)
Construct a ContextFactory for the supplied Java Object. |
Method Summary | |
---|---|
void |
addProperty(String propertyName,
Object value)
Adds a property to the context |
void |
addSourceWireFactories(String referenceName,
Class referenceInterface,
List 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. |
Context |
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<WireFactory> |
getSourceWireFactories()
Returns a collection of source-side wire factories for references. |
Map |
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(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 SystemObjectContextFactory(String name, Object instance)
name
- the name to be assigned to the resulting componentinstance
- the Java Object that provides the implementationMethod Detail |
---|
public Context createContext() throws ContextCreationException
ContextFactory
Context
based on configuration supplied by a logical model assembly
createContext
in interface ContextFactory
ContextCreationException
- if an error occurs creating the contextpublic Scope getScope()
ContextFactory
getScope
in interface ContextFactory
public String getName()
ContextFactory
Context
produced by the current factory
getName
in interface ContextFactory
public void addProperty(String propertyName, Object value)
ContextFactory
addProperty
in interface ContextFactory
public void addTargetWireFactory(String serviceName, TargetWireFactory factory)
ContextFactory
addTargetWireFactory
in interface ContextFactory
public TargetWireFactory getTargetWireFactory(String serviceName)
ContextFactory
getTargetWireFactory
in interface ContextFactory
public Map getTargetWireFactories()
ContextFactory
getTargetWireFactories
in interface ContextFactory
public void addSourceWireFactory(String referenceName, SourceWireFactory factory)
ContextFactory
addSourceWireFactory
in interface ContextFactory
public void addSourceWireFactories(String referenceName, Class referenceInterface, List factory, boolean multiplicity)
ContextFactory
addSourceWireFactories
in interface ContextFactory
public List<WireFactory> getSourceWireFactories()
ContextFactory
getSourceWireFactories
in interface ContextFactory
public void prepare(CompositeContext parent)
ContextFactory
prepare
in interface ContextFactory
parent
- the parent context
|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |