Package org.jboss.as.integration.hornetq.jopr.util

Examples of org.jboss.as.integration.hornetq.jopr.util.Operation


      return config;
   }

   public OperationResult invokeOperation(String s, Configuration configuration) throws InterruptedException, Exception
   {
      Operation oper = Operation.getOperation(s);
      Collection<PropertySimple> props = configuration.getSimpleProperties().values();
      SimpleValueSupport[] params = new SimpleValueSupport[props.size()];
      SimpleValueSupport[] signature = new SimpleValueSupport[props.size()];
      populateParams(props, params, signature);
      ArrayValueSupport param = new ArrayValueSupport(new ArrayMetaType(SimpleMetaType.STRING, false));
      param.setValue(params);
      ArrayValueSupport sig = new ArrayValueSupport(new ArrayMetaType(SimpleMetaType.STRING, false));
      sig.setValue(signature);
      SimpleValueSupport queueName = new SimpleValueSupport(SimpleMetaType.STRING, resourceContext.getResourceKey());
      SimpleValueSupport methodName = new SimpleValueSupport(SimpleMetaType.STRING, oper.getOperationName());
      ManagementView view = getProfileService();
      String methodOperation = getInvokeOperation();
      if("JMSMessage".equalsIgnoreCase(oper.getResultsType()))
      {
         methodOperation = getInvokeOperationJMSMessage();
      }
      else if("SubscriptionInfo".equalsIgnoreCase(oper.getResultsType()))
      {
         methodOperation = getInvokeOperationSubscriptionMessage();
      }
      ManagedOperation operation = ManagementSupport.getOperation(view, getComponentName(), methodOperation, getComponentType());
      Object result = null;
      result = operation.invoke(queueName, methodName, param, sig);
      if (result == null)
      {
         return null;
      }
      return formatResults(result, oper.getResultsType());
   }
View Full Code Here

TOP

Related Classes of org.jboss.as.integration.hornetq.jopr.util.Operation

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.