Package org.jboss.managed.api

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


      Set<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
      JMSComponent context = (JMSComponent) resourceDiscoveryContext.getParentResourceComponent();
      ManagementView managementView = context.getProfileService();
      ManagedOperation operation = ManagementSupport.getOperation(managementView, COMPONENT_NAME, "getJMSConnectionFactories", COMPONENT_TYPE);

      ArrayValueSupport value = (ArrayValueSupport) operation.invoke();

      for (int i = 0; i < value.getLength(); i++)
      {
         SimpleValueSupport queue = (SimpleValueSupport) value.getValue(i);
         ResourceType resourceType = resourceDiscoveryContext.getResourceType();
View Full Code Here


                                        boolean useGlobalPools,
                                        long retryInterval,
                                        String connectionLoadBalancingPolicyClassName) throws Exception
   {
      ManagedOperation operation = ManagementSupport.getOperation(managementView, COMPONENT_NAME, "updateConnectionFactory", new ComponentType("JMSManage", "ConnectionFactoryManage"));
      operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, name),
            new SimpleValueSupport(SimpleMetaType.STRING, clientId),
            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, dupsOkBatchSize),
            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, transactionBatchSize),
            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, clientFailureCheckPeriod),
            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, connectionTTL),
View Full Code Here

      JMSComponent context = (JMSComponent) resourceDiscoveryContext.getParentResourceComponent();
      ManagementView managementView = context.getProfileService();
      ManagedOperation operation = ManagementSupport.getOperation(managementView, JMSConstants.Topic.COMPONENT_NAME,
            "getJMSTopics", JMSConstants.Topic.COMPONENT_TYPE);

      ArrayValueSupport value = (ArrayValueSupport) operation.invoke();

      for (int i = 0; i < value.getLength(); i++)
      {
         SimpleValueSupport queue = (SimpleValueSupport) value.getValue(i);
         ResourceType resourceType = resourceDiscoveryContext.getResourceType();
View Full Code Here

   public void deleteResource() throws Exception
   {
      ManagementView view = getProfileService();
      ManagedOperation operation = ManagementSupport.getOperation(view, getComponentName(), getDeleteOperationName(), getComponentType());
      operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, resourceContext.getResourceKey()));
   }

   public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> measurementScheduleRequests) throws Exception
   {
      ArrayValueSupport support = new ArrayValueSupport(new ArrayMetaType(SimpleMetaType.STRING, false));
View Full Code Here

      }
      support.setValue(valueSupports);
      ManagementView view = getProfileService();

      ManagedOperation operation = ManagementSupport.getOperation(view, getComponentName(), getMeasurementsOperationName(), getComponentType());
      ArrayValueSupport vals = (ArrayValueSupport) operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, resourceContext.getResourceKey()), support);
      it = measurementScheduleRequests.iterator();
      for (int i = 0, valueSupportsLength = valueSupports.length; i < valueSupportsLength; i++)
      {
         MeasurementScheduleRequest request = it.next();
         SimpleValueSupport simpleValueSupport = (SimpleValueSupport) vals.getValue(i);
View Full Code Here

      Configuration config = new Configuration();
      ManagementView view = getProfileService();

      ManagedOperation operation = ManagementSupport.getOperation(view, getComponentName(), getConfigurationOperationName(), getComponentType());

      CompositeValueSupport val = (CompositeValueSupport) operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, resourceContext.getResourceKey()));

      ConfigurationDefinition configDef = resourceContext.getResourceType().getResourceConfigurationDefinition();
      List<PropertyDefinition> propertyDefinitionList = configDef.getPropertiesInGroup("HornetQCustomProperties");
      for (PropertyDefinition definition : propertyDefinitionList)
      {
View Full Code Here

      {
         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

         }
         else if ("started".equalsIgnoreCase(measurementScheduleRequest.getName()))
         {
            ManagementView managementView = getProfileService();
            ManagedOperation operation = ManagementSupport.getOperation(managementView, "JMSServerMO", "isStarted", new ComponentType("JMSManage", "ServerManage"));
            SimpleValueSupport support = (SimpleValueSupport) operation.invoke();
            measurementReport.addData(new MeasurementDataTrait(measurementScheduleRequest, support.getValue().toString()));
         }
      }

   }
View Full Code Here

                                        long retryInterval,
                                        String connectionLoadBalancingPolicyClassName)
         throws Exception
   {
      ManagedOperation operation = ManagementSupport.getOperation(managementView, JMSConstants.ConnectionFactory.COMPONENT_NAME, "createConnectionFactory", JMSConstants.ConnectionFactory.COMPONENT_TYPE);
      operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, name),
            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, ha),
            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, useDiscovery),
            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, cfType),
            new SimpleValueSupport(SimpleMetaType.STRING, connectorNames),
            new SimpleValueSupport(SimpleMetaType.STRING, bindings),
View Full Code Here

      StringBuffer sendRoles = new StringBuffer();
      StringBuffer consumeRoles = new StringBuffer();
      createRoles(createResourceReport, name, sendRoles, consumeRoles);

      operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, name),
            new SimpleValueSupport(SimpleMetaType.STRING, jndiName),
            new SimpleValueSupport(SimpleMetaType.STRING, DLA),
            new SimpleValueSupport(SimpleMetaType.STRING, expiryAddress),
            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, maxSize),
            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, pageSize),
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.