2016/05/28 - Apache Tuscany has been retired.
For more information, please explore the Attic.
org.apache.tuscany.sca.implementation.osgi.runtime
Class OSGiTargetInvoker<T>
java.lang.Object
org.apache.tuscany.sca.implementation.osgi.runtime.OSGiTargetInvoker<T>
- All Implemented Interfaces:
- Invoker
- Direct Known Subclasses:
- OSGiRemotableInvoker
public class OSGiTargetInvoker<T>
- extends java.lang.Object
- implements Invoker
Java->OSGi references use OSGiTargetInvoker to call methods from OSGi bundles
OSGi->Java references use JDKProxyService and invocation handler and do not use this class
OSGi->OSGi references go through OSGi reference mechanisms when a proxy is not used
When a proxy is used, this invoker is used to call methods from OSGi bundles
A proxy is used for OSGi->OSGi if
1) target reference properties are specified OR
2) there are one or more non-blocking methods in the target interface OR
3) scope is not COMPOSITE
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
target
protected InstanceWrapper<T> target
OSGiTargetInvoker
public OSGiTargetInvoker(Operation operation,
OSGiImplementationProvider provider,
RuntimeComponentService service)
getInstance
protected InstanceWrapper getInstance(java.lang.Object contextId)
throws TargetResolutionException,
TargetInvocationException
- Resolves the target service instance or returns a cached one
- Throws:
TargetResolutionException
TargetInvocationException
invokeMethod
protected java.lang.Object invokeMethod(java.lang.Object instance,
java.lang.reflect.Method m,
Message msg)
throws java.lang.reflect.InvocationTargetException
- Throws:
java.lang.reflect.InvocationTargetException
invoke
public Message invoke(Message msg)
- Description copied from interface:
Invoker
- Process a synchronous wire
- Specified by:
invoke
in interface Invoker
- Parameters:
msg
- The request Message for the wire
- Returns:
- The response Message from the wire