Package org.jboss.managed.api

Examples of org.jboss.managed.api.ManagedOperation


         {
            ManagementOperation managementOp = getAnnotation(ManagementOperation.class, methodInfo, metaData);
            if (managementOp == null)
               continue;

            ManagedOperation op = getManagedOperation(methodInfo, managementOp, metaData);
            operations.add(op);
         }
      }

      ManagedObjectImpl result = new ManagedObjectImpl(name, properties);
View Full Code Here


      q1.setJndiName("queues/Q1");
      q1.setDomain(new SecurityDomain("java:/jaas/JMS"));

      ManagedObject q1MO = initManagedObject(q1);
      Set<ManagedOperation> ops = q1MO.getOperations();
      ManagedOperation listAllMessages = ManagedOperationMatcher.findOperation(ops, "listAllMessages");
      assertNotNull(listAllMessages);
      MetaType returnType = listAllMessages.getReturnType();
      assertEquals(MessageListMapper.TYPE, returnType);
      MetaMapper returnTypeMapper = listAllMessages.getTransientAttachment(MetaMapper.class);
      assertNotNull(returnTypeMapper);
      assertTrue(returnTypeMapper instanceof MessageListMapper);
   }
View Full Code Here

      q1.setJndiName("queues/Q1");
      q1.setDomain(new SecurityDomain("java:/jaas/JMS"));

      ManagedObject q1MO = initManagedObject(q1);
      Set<ManagedOperation> ops = q1MO.getOperations();
      ManagedOperation listAllMessages = ManagedOperationMatcher.findOperation(ops, "listAllMessages", SimpleMetaType.STRING);
      assertNotNull(listAllMessages);
      MetaType returnType = listAllMessages.getReturnType();
      assertEquals(MessageListMapper.TYPE, returnType);
      ManagedParameter[] params = listAllMessages.getParameters();
      assertEquals(1, params.length);
      assertEquals(SimpleMetaType.STRING, params[0].getMetaType());
      MetaMapper mapper = params[0].getTransientAttachment(MetaMapper.class);
      assertNotNull(mapper);
      assertTrue(mapper instanceof StringObjectNameMetaMapper);
View Full Code Here

      q1.setJndiName("queues/Q1");
      q1.setDomain(new SecurityDomain("java:/jaas/JMS"));

      ManagedObject q1MO = initManagedObject(q1);
      Set<ManagedOperation> ops = q1MO.getOperations();
      ManagedOperation listAllMessages = ManagedOperationMatcher.findOperation(ops, "listAllMessages", SimpleMetaType.STRING);
      assertNotNull(listAllMessages);
      Impact lamImpact = listAllMessages.getImpact();
      assertEquals(Impact.ReadOnly, lamImpact);

      ManagedOperation start = ManagedOperationMatcher.findOperation(ops, "start");
      assertNotNull(start);
      Impact startImpact = start.getImpact();
      assertEquals(Impact.Lifecycle, startImpact);     
   }
View Full Code Here

      assertEquals(sd2MO, xaSecDomainPropTarget);

      // Validate the operations on the localDataMO
      Set<ManagedOperation> localDataOps = localDataMO.getOperations();
      assertEquals("localDataOps ops count is 4", 4, localDataOps.size());
      ManagedOperation flushPool = null;
      ManagedOperation closePool = null;
      ManagedOperation takesString = null;
      ManagedOperation constrainedIntx10 = null;

      for(ManagedOperation op : localDataOps)
      {
         if (op.getName().equals("flushPool"))
            flushPool = op;
         if (op.getName().equals("closePool"))
            closePool = op;
         if (op.getName().equals("takesString"))
            takesString = op;
         if (op.getName().equals("constrainedIntx10"))
            constrainedIntx10 = op;

      }
      // flushPool
      assertNotNull("flushPool found", flushPool);
      assertEquals("flushPool", flushPool.getName());
      assertEquals("Flush the connections in the pool", flushPool.getDescription());
      assertEquals(ManagedOperation.Impact.WriteOnly, flushPool.getImpact());
      assertEquals(SimpleMetaType.VOID, flushPool.getReturnType());
      assertEquals("zero params", 0, flushPool.getParameters().length);
      // closePool
      assertNotNull("closePool found", closePool);
      assertEquals("closePool", closePool.getName());
      assertEquals("Close the connections in the pool", closePool.getDescription());
      assertEquals(ManagedOperation.Impact.WriteOnly, closePool.getImpact());
      assertEquals(SimpleMetaType.VOID, closePool.getReturnType());
      assertEquals("zero params", 0, closePool.getParameters().length);
      // takesString
      assertNotNull("takesString found", takesString);
      assertEquals("takesString", takesString.getName());
      assertEquals("Takes a string and returns it", takesString.getDescription());
      assertEquals(ManagedOperation.Impact.ReadOnly, takesString.getImpact());
      assertEquals(SimpleMetaType.STRING, takesString.getReturnType());
      ManagedParameter[] takesStringParams = takesString.getParameters();
      assertEquals("one params", 1, takesStringParams.length);
      assertEquals("param name", "input", takesStringParams[0].getName());
      assertEquals("param description", "The string to return", takesStringParams[0].getDescription());
      assertEquals("param type", SimpleMetaType.STRING, takesStringParams[0].getMetaType());
      // constrainedIntx10
      assertNotNull("constrainedIntx10 found", constrainedIntx10);
      assertEquals("constrainedIntx10", constrainedIntx10.getName());
      assertEquals("Takes an int and multiples by 10", constrainedIntx10.getDescription());
      assertEquals(ManagedOperation.Impact.ReadOnly, constrainedIntx10.getImpact());
      assertEquals(SimpleMetaType.INTEGER_PRIMITIVE, constrainedIntx10.getReturnType());
      ManagedParameter[] constrainedIntx10Params = constrainedIntx10.getParameters();
      assertEquals("one params", 1, constrainedIntx10Params.length);
      assertEquals("param name", "input", constrainedIntx10Params[0].getName());
      assertEquals("param description", "The int to multiple", constrainedIntx10Params[0].getDescription());
      assertEquals("param type", SimpleMetaType.INTEGER_PRIMITIVE, constrainedIntx10Params[0].getMetaType());
      Object min = constrainedIntx10Params[0].getMinimumValue();
View Full Code Here

         {
            ManagementOperation managementOp = methodInfo.getUnderlyingAnnotation(ManagementOperation.class);
            if (managementOp == null)
               continue;

            ManagedOperation op = getManagedOperation(methodInfo, managementOp);
            operations.add(op);
         }
      }

      ManagedObjectImpl result = new ManagedObjectImpl(name, properties);
View Full Code Here

/* 858 */     Class[] ifaces = { ManagedOperation.class };
/* 859 */     for (ManagedOperation op : ops)
/*     */     {
/* 861 */       String dispatchName = "ProfileService.ManagedOperation@" + System.identityHashCode(op);
/* 862 */       Dispatcher.singleton.registerTarget(dispatchName, new ManagedOperationDelegate(op, mo));
/* 863 */       ManagedOperation opProxy = (ManagedOperation)Remoting.createRemoteProxy(dispatchName, loader, ifaces, this.locator, interceptors, "ProfileService");
/*     */
/* 865 */       opProxies.add(opProxy);
/*     */     }
/* 867 */     return opProxies;
/*     */   }
View Full Code Here

/*     */       {
/* 485 */         ManagementOperation managementOp = (ManagementOperation)methodInfo.getUnderlyingAnnotation(ManagementOperation.class);
/* 486 */         if (managementOp == null) {
/*     */           continue;
/*     */         }
/* 489 */         ManagedOperation op = getManagedOperation(methodInfo, managementOp);
/* 490 */         operations.add(op);
/*     */       }
/*     */     }
/*     */
/* 494 */     ManagedObjectImpl result = new ManagedObjectImpl(name, properties);
View Full Code Here

         {
            ManagementOperation managementOp = getAnnotation(ManagementOperation.class, methodInfo, metaData);
            if (managementOp == null)
               continue;

            ManagedOperation op = getManagedOperation(methodInfo, managementOp, metaData);
            operations.add(op);
         }
      }

      ManagedObjectImpl result = new ManagedObjectImpl(name, properties);
View Full Code Here

TOP

Related Classes of org.jboss.managed.api.ManagedOperation

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.