Package fr.imag.adele.apam.declarations

Examples of fr.imag.adele.apam.declarations.AtomicImplementationDeclaration


     
      /*
       * Register instrumentation for message push at the provider side
       */
      PojoMetadata manipulation           = getFactory().getPojoMetadata();
      AtomicImplementationDeclaration primitive  = (AtomicImplementationDeclaration) declaration;
      for (ProviderInstrumentation providerInstrumentation : primitive.getProviderInstrumentation()) {
       
          MessageReference messageReference = providerInstrumentation.getProvidedResource().as(MessageReference.class);
        if (messageReference == null)
          continue;

View Full Code Here


  private void loadLifeCycleCallbacks() throws ConfigurationException {

    if (!(getFactory().getDeclaration() instanceof AtomicImplementationDeclaration))
      return;

    AtomicImplementationDeclaration implementation = (AtomicImplementationDeclaration) getFactory().getDeclaration();

    /*
     * Add automatically a life-cycle callback in case the class implements directly the APAM component interface
     */
    Class<?> pojoClass = this.getClazz();
    if (ApamComponent.class.isAssignableFrom(pojoClass)) {
      implementation.addCallback(AtomicImplementationDeclaration.Event.INIT,    new CallbackDeclaration(implementation, "apamInit"));
      implementation.addCallback(AtomicImplementationDeclaration.Event.REMOVE, new CallbackDeclaration(implementation, "apamRemove"));
    }
   
    /*
     * register callbacks
     */
    for (AtomicImplementationDeclaration.Event trigger : AtomicImplementationDeclaration.Event.values()) {

      Set<CallbackDeclaration> callbacks = implementation.getCallback(trigger);

      if (callbacks == null)
        continue;

      for (CallbackDeclaration callbackDeclaration : callbacks) {
View Full Code Here

              SpecificationReference specification            = reference(CST.PROVIDE_SPECIFICATION, ComponentKind.SPECIFICATION);
              String range                         = property(CST.REQUIRE_VERSION);
              VersionedReference<SpecificationDeclaration> specificationVersion  = specification != null ? VersionedReference.range(specification,range) : null;
             
              InstrumentedClass instrumentedClass =  new UnloadedClassMetadata(property(CST.PROVIDE_CLASSNAME));
                component = new AtomicImplementationDeclaration(componentName, specificationVersion, instrumentedClass);
            }
        break;
      case INSTANCE:
              ImplementationReference<ImplementationDeclaration> implementation   = reference(CST.IMPLNAME,ComponentKind.IMPLEMENTATION);
            String range                             = property(CST.REQUIRE_VERSION);
View Full Code Here

        /*
         * Specific properties depending on the kind of component
         */
        if (component instanceof AtomicImplementationDeclaration) {
          AtomicImplementationDeclaration atomicComponent = (AtomicImplementationDeclaration) component;
            property(CST.PROVIDE_CLASSNAME, atomicComponent.getClassName());
        }

    if (component instanceof CompositeDeclaration) {
      property(CST.APAM_COMPOSITE,flag(true));

View Full Code Here

      ImplementationDeclaration apamImplDecl = i.getImpl()
          .getImplDeclaration();

      if (apamImplDecl instanceof AtomicImplementationDeclaration) {

        AtomicImplementationDeclaration atomicInitialInstance = (AtomicImplementationDeclaration) apamImplDecl;

        for (String classname : clazz) {

          if (atomicInitialInstance.getClassName().equals(classname)) {
            pool.add(i);
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.declarations.AtomicImplementationDeclaration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.