Package org.jboss.managed.api

Examples of org.jboss.managed.api.ManagedOperation.invoke()


      assertNotNull(component);
     
      log.info("Properties: "+component.getProperties().keySet());
     
      ManagedOperation o = getOperation(component, "listMessageCountersAsHTML", new String[0]);
      MetaValue v = o.invoke(new MetaValue[0]);
      assertNotNull("null operation return value", v);
      log.debug("result" + v);
   }

   public void testTopicMetrics() throws Exception
View Full Code Here


   public void testTopicOperations() throws Exception
   {
      ManagedComponent component = getManagementView().getComponent("testCreateTopic", TopicType);
      ManagedOperation o = getOperation(component, "listAllSubscriptionsAsHTML", new String[0]);
      MetaValue v = o.invoke(new MetaValue[0]);
      assertNotNull("null operation return value", v);
      log.debug("result" + v);
   }
  
   public void testRemoveTopic() throws Exception
View Full Code Here

      // Operations
      Set<ManagedOperation> ops = mc.getOperations();
      log.info("ServerInfo.ops: "+ ops);
      ManagedOperation listThreadCpuUtilization = ManagedOperationMatcher.findOperation(ops, "listThreadCpuUtilization");
      assertNotNull(listThreadCpuUtilization);
      MetaValue listThreadCpuUtilizationMV = listThreadCpuUtilization.invoke();
      // TODO
      assertNotNull(listThreadCpuUtilizationMV);
      assertEquals(SimpleMetaType.STRING, listThreadCpuUtilizationMV.getMetaType());
      SimpleValue listThreadCpuUtilizationSV = (SimpleValue) listThreadCpuUtilizationMV;
      String cpuUtilization = (String) listThreadCpuUtilizationSV.getValue();
View Full Code Here

      // Try invoking listThreadCpuUtilization and checking freeMemory until it changes
      long currentFreeMemoryValue = freeMemoryValue;
      for(int n = 0; n < 100; n ++)
      {
         listThreadCpuUtilization.invoke();
         currentFreeMemoryValue = getLong(freeMemory);
         if(currentFreeMemoryValue != freeMemoryValue)
            break;
      }
      assertTrue("currentFreeMemoryValue != original freeMemoryValue",
View Full Code Here

         operations.put(mo.getName(), mo);
      }
     
      ManagedOperation mgdop = operations.get("showHistory");
      assertNotNull("HAPartition has showHistory", mgdop);
      MetaValue result = mgdop.invoke();
      assertNotNull(result);
     
      mgdop = operations.get("showHistoryAsXML");
      assertNotNull("HAPartition has showHistoryAsXML", mgdop);
      result = mgdop.invoke();
View Full Code Here

      MetaValue result = mgdop.invoke();
      assertNotNull(result);
     
      mgdop = operations.get("showHistoryAsXML");
      assertNotNull("HAPartition has showHistoryAsXML", mgdop);
      result = mgdop.invoke();
      assertNotNull(result);
     
      mgdop = operations.get("getDRMServiceNames");
      assertNotNull("HAPartition has getDRMServiceNames", mgdop);
      result = mgdop.invoke();
View Full Code Here

      result = mgdop.invoke();
      assertNotNull(result);
     
      mgdop = operations.get("getDRMServiceNames");
      assertNotNull("HAPartition has getDRMServiceNames", mgdop);
      result = mgdop.invoke();
      assertTrue(result instanceof CollectionValue);
      MetaValue[] elements = ((CollectionValue) result).getElements();
      assertNotNull(elements);
      boolean found = false;
      for (MetaValue element : elements)
View Full Code Here

      }
      assertTrue(found);
     
      mgdop = operations.get("listDRMContent");     
      assertNotNull("HAPartition has listDRMContent", mgdop);
      result = mgdop.invoke();
      assertTrue(result instanceof SimpleValue);
      Object val = ((SimpleValue) result).getValue();
      assertTrue(val instanceof String);
      assertTrue(((String) val).indexOf(HAJNDI) > -1);
     
View Full Code Here

      assertTrue(val instanceof String);
      assertTrue(((String) val).indexOf(HAJNDI) > -1);
     
      mgdop = operations.get("listDRMContentAsXml");
      assertNotNull("HAPartition has listDRMContentAsXml", mgdop);
      result = mgdop.invoke();
      assertTrue(result instanceof SimpleValue);
      val = ((SimpleValue) result).getValue();
      assertTrue(val instanceof String);
      assertTrue(((String) val).indexOf(HAJNDI) > -1);
     
View Full Code Here

     
      mgdop = operations.get("getDRMServiceViewId");
      assertNotNull("HAPartition has getDRMServiceViewId", mgdop)
      MetaValue hajndiparam = SimpleValueSupport.wrap(HAJNDI);
      MetaValue[] hajndiparams = new MetaValue[]{hajndiparam};
      result = mgdop.invoke(hajndiparams);
      assertNotNull(result);
     
      mgdop = operations.get("lookupDRMNodeNames");
      assertNotNull("HAPartition has lookupDRMNodeNames", mgdop);
      result = mgdop.invoke(hajndiparams);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.