2016/05/28 - Apache Tuscany has been retired.
For more information, please explore the Attic.
org.apache.tuscany.sca.implementation.osgi.context
Class OSGiAnnotations
java.lang.Object
org.apache.tuscany.sca.implementation.osgi.context.OSGiAnnotations
public class OSGiAnnotations
- extends java.lang.Object
OSGi annotation processing
OSGi bundles are not introspected by OSGiImplementation when a component is created.
Instead if the list of implementation classes is specified in ,
the classes are introspected when the bundle is resolved. The classes are loaded using
the bundle ClassLoader, and hence the delay in annotation processing is inevitable.
There is one other difference compared to implementation.java. While instances (and
the instance class) are associated with a component in Java, all Java annotations from
the component implementation class apply to all the component instances. In OSGi,
instances are associated with services, and a bundle can register multiple services.
Hence annotations from classes need to be stored separately so that the right ones
can be associated with the service instance.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OSGiAnnotations
public OSGiAnnotations(ModelFactoryExtensionPoint modelFactories,
java.lang.String[] classList,
RuntimeComponent runtimeComponent,
JavaPropertyValueObjectFactory propertyValueFactory,
ProxyFactory proxyFactory,
RequestContextFactory requestContextFactory,
Bundle mainBundle,
java.util.ArrayList<Bundle> dependentBundles)
processAnnotations
public void processAnnotations()
throws IntrospectionException
- Throws:
IntrospectionException
injectProperties
public void injectProperties(java.lang.Object instance)
getScope
public Scope getScope()
isAllowsPassByReference
public boolean isAllowsPassByReference(java.lang.Object instance,
java.lang.reflect.Method method)
isEagerInit
public boolean isEagerInit()
getMaxAge
public long getMaxAge()
getMaxIdleTime
public long getMaxIdleTime()
getInitMethod
public java.lang.reflect.Method getInitMethod(java.lang.Object instance)
getDestroyMethod
public java.lang.reflect.Method getDestroyMethod(java.lang.Object instance)