|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WireFactory<T>
Implementations are responsible for managing source or target sides of a wire, including creation of service proxies.
Source-side wires are injected on references and may contain policy interceptors and/or handlers specified by them. Target-side
wires may contain policy interceptors and/or handlers specified by the service the wire is targeted to or one of its
operations. Source- and target-side WireFactory
s are held in the ContextFactory
associated with the source reference or target service.
WireBuilder
s configured in the runtime. When a new component implementation instance is
created, it will be injected with a proxy for each reference containing the bridged source- and target-side wires.
Unmanaged code, i.e. clients that are not components, that perform a locate operation are handled differently. In this case, a
target-side proxy will be returned by the locate operation created by the WireFactory
associated with the target
service. This target-side proxy will only contain the target-side wire and its handlers/interceptors.Ê
Wires are structured by operation; that is, they contain an invocation chain per operation on a service. Note that the service
specified by a reference may differ in type from the target service specified by the wire. In this case, a mediation may be
performed by the runtime. Hence, source-to-target bridging is done on a per operation basis. Source- and target-side Invocation
chains are accessible through the subtypes of WireFactory
.
Method Summary | |
---|---|
void |
addInterface(java.lang.Class claz)
Adds an interface type generated proxies implement |
T |
createProxy()
Returns a proxy for a service specified by a reference or target |
java.lang.Class |
getBusinessInterface()
Returns the primary interface type implemented by generated proxies |
java.lang.Class[] |
getImplementatedInterfaces()
Returns an array of all interfaces implemented by generated proxies |
void |
initialize()
Prepares the factory. |
void |
setBusinessInterface(java.lang.Class interfaze)
Sets the primary interface type generated proxies implement |
Method Detail |
---|
void initialize() throws WireFactoryInitException
WireFactoryInitException
- if an error is encountered during initializationT createProxy() throws ProxyCreationException
ProxyCreationException
void setBusinessInterface(java.lang.Class interfaze)
java.lang.Class getBusinessInterface()
void addInterface(java.lang.Class claz)
java.lang.Class[] getImplementatedInterfaces()
|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |