Codota Logo
ManagementHelper.getResult
Code IndexAdd Codota to your IDE (free)

How to use
getResult
method
in
org.apache.activemq.artemis.api.core.management.ManagementHelper

Best Java code snippets using org.apache.activemq.artemis.api.core.management.ManagementHelper.getResult (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: wildfly/wildfly

/**
* Returns the result of an operation invocation or an attribute value.
* <br>
* If an error occurred on the server, {@link #hasOperationSucceeded(Message)} will return {@code false}.
* and the result will be a String corresponding to the server exception.
*/
public static Object getResult(final ICoreMessage message) throws Exception {
 return getResult(message, null);
}
origin: wildfly/wildfly

/**
* Returns the result of an operation invocation or an attribute value.
* <br>
* If an error occurred on the server, {@link #hasOperationSucceeded(Message)} will return {@code false}.
* and the result will be a String corresponding to the server exception.
*/
public static Object getResult(final Message message, Class desiredType) throws Exception {
 return ManagementHelper.getResult(JMSManagementHelper.getCoreMessage(message), desiredType);
}
origin: apache/activemq-artemis

/**
* Returns the result of an operation invocation or an attribute value.
* <br>
* If an error occurred on the server, {@link #hasOperationSucceeded(Message)} will return {@code false}.
* and the result will be a String corresponding to the server exception.
*/
public static Object getResult(final ICoreMessage message) throws Exception {
 return getResult(message, null);
}
origin: org.apache.activemq/artemis-cli

@Override
public void requestSuccessful(ClientMessage reply) throws Exception {
 final String result = (String) ManagementHelper.getResult(reply, String.class);
 printStats(result);
}
origin: apache/activemq-artemis

@Override
public void requestSuccessful(ClientMessage reply) throws Exception {
 final String result = ManagementHelper.getResult(reply, String.class) + " created successfully.";
 context.out.println(result);
}
origin: apache/activemq-artemis

@Override
public void requestSuccessful(ClientMessage reply) throws Exception {
 final String result = ManagementHelper.getResult(reply, String.class) + " created successfully.";
 context.out.println(result);
}
origin: org.apache.activemq/artemis-cli

@Override
public void requestSuccessful(ClientMessage reply) throws Exception {
 final String result = ManagementHelper.getResult(reply, String.class) + " updated successfully.";
 context.out.println(result);
}
origin: apache/activemq-artemis

/**
* Returns the result of an operation invocation or an attribute value.
* <br>
* If an error occurred on the server, {@link #hasOperationSucceeded(Message)} will return {@code false}.
* and the result will be a String corresponding to the server exception.
*/
public static Object getResult(final Message message, Class desiredType) throws Exception {
 return ManagementHelper.getResult(JMSManagementHelper.getCoreMessage(message), desiredType);
}
origin: apache/activemq-artemis

  @Override
  public void requestFailed(ClientMessage reply) throws Exception {
   String errMsg = (String) ManagementHelper.getResult(reply, String.class);
   context.err.println("Failed to create queue " + getName() + ". Reason: " + errMsg);
  }
});
origin: apache/activemq-artemis

  @Override
  public void requestFailed(ClientMessage reply) throws Exception {
   String errMsg = (String) ManagementHelper.getResult(reply, String.class);
   context.err.println("Failed to show address " + getName(false) + ". Reason: " + errMsg);
  }
});
origin: apache/activemq-artemis

  @Override
  public void requestFailed(ClientMessage reply) throws Exception {
   String errMsg = (String) ManagementHelper.getResult(reply, String.class);
   context.err.println("Failed to purge queue " + getName() + ". Reason: " + errMsg);
  }
});
origin: apache/activemq-artemis

  @Override
  public void requestFailed(ClientMessage reply) throws Exception {
   String errMsg = (String) ManagementHelper.getResult(reply, String.class);
   context.err.println("Failed to update " + getName() + ". Reason: " + errMsg);
  }
});
origin: apache/activemq-artemis

  @Override
  public void requestFailed(ClientMessage reply) throws Exception {
   String errMsg = (String) ManagementHelper.getResult(reply, String.class);
   context.err.println("Failed to create address " + getName(true) + ". Reason: " + errMsg);
  }
});
origin: apache/activemq-artemis

  @Override
  public void requestFailed(ClientMessage reply) throws Exception {
   String errMsg = (String) ManagementHelper.getResult(reply, String.class);
   context.err.println("Failed to delete address " + getName(true) + ". Reason: " + errMsg);
  }
});
origin: org.apache.activemq/artemis-jms-client-all

/**
* Returns the result of an operation invocation or an attribute value.
* <br>
* If an error occurred on the server, {@link #hasOperationSucceeded(Message)} will return {@code false}.
* and the result will be a String corresponding to the server exception.
*/
public static Object getResult(final Message message, Class desiredType) throws Exception {
 return ManagementHelper.getResult(JMSManagementHelper.getCoreMessage(message), desiredType);
}
origin: apache/activemq-artemis

public byte[] getQueueIdFromName(String queueName) throws Exception {
 try {
   ClientMessage message = getQueueAttribute(queueName, "ID");
   Number idObject = (Number) ManagementHelper.getResult(message);
   ByteBuffer byteBuffer = ByteBuffer.allocate(8);
   byteBuffer.putLong(idObject.longValue());
   return byteBuffer.array();
 } catch (Exception e) {
   throw new ActiveMQException("Error occured when looking up FQQN.  Please ensure the FQQN exists.", e, ActiveMQExceptionType.ILLEGAL_STATE);
 }
}
origin: org.apache.activemq/artemis-cli

public byte[] getQueueIdFromName(String queueName) throws Exception {
 try {
   ClientMessage message = getQueueAttribute(queueName, "ID");
   Number idObject = (Number) ManagementHelper.getResult(message);
   ByteBuffer byteBuffer = ByteBuffer.allocate(8);
   byteBuffer.putLong(idObject.longValue());
   return byteBuffer.array();
 } catch (Exception e) {
   throw new ActiveMQException("Error occured when looking up FQQN.  Please ensure the FQQN exists.", e, ActiveMQExceptionType.ILLEGAL_STATE);
 }
}
origin: apache/activemq-artemis

@Test
public void testHandleManagementMessageWithUnknownAttribute() throws Exception {
 Configuration config = createBasicConfig().setJMXManagementEnabled(false);
 ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(config, false));
 server.start();
 // invoke attribute and operation on the server
 ICoreMessage message = new CoreMessage(1, 100);
 ManagementHelper.putAttribute(message, ResourceNames.BROKER, "started");
 ICoreMessage reply = server.getManagementService().handleMessage(message);
 Assert.assertTrue(ManagementHelper.hasOperationSucceeded(reply));
 Assert.assertTrue((Boolean) ManagementHelper.getResult(reply));
}
origin: apache/activemq-artemis

@Test
public void testHandleManagementMessageWithOperationWhichFails() throws Exception {
 Configuration config = createBasicConfig().setJMXManagementEnabled(false);
 ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(config, false));
 server.start();
 // invoke attribute and operation on the server
 CoreMessage message = new CoreMessage(1, 100);
 ManagementHelper.putOperationInvocation(message, ResourceNames.BROKER, "thereIsNoSuchOperation");
 ICoreMessage reply = server.getManagementService().handleMessage(message);
 Assert.assertFalse(ManagementHelper.hasOperationSucceeded(reply));
 Assert.assertNotNull(ManagementHelper.getResult(reply));
}
origin: apache/activemq-artemis

@Test
public void testHandleManagementMessageWithUnknowResource() throws Exception {
 Configuration config = createBasicConfig().setJMXManagementEnabled(false);
 ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(config, false));
 server.start();
 // invoke attribute and operation on the server
 ICoreMessage message = new CoreMessage(1, 100);
 ManagementHelper.putOperationInvocation(message, "Resouce.Does.Not.Exist", "toString");
 ICoreMessage reply = server.getManagementService().handleMessage(message);
 Assert.assertFalse(ManagementHelper.hasOperationSucceeded(reply));
 Assert.assertNotNull(ManagementHelper.getResult(reply));
}
org.apache.activemq.artemis.api.core.managementManagementHelpergetResult

Javadoc

Returns the result of an operation invocation or an attribute value.
If an error occurred on the server, #hasOperationSucceeded(Message) will return false. and the result will be a String corresponding to the server exception.

Popular methods of ManagementHelper

  • putOperationInvocation
    Stores an operation invocation in a message to invoke the corresponding operation the value from the
  • hasOperationSucceeded
    Returns whether the invocation of the management operation on the server resource succeeded.
  • putAttribute
    Stores a resource attribute in a message to retrieve the value from the server resource.
  • getResults
    Returns the result of an operation invocation or an attribute value. If an error occurred on the ser
  • isOperationResult
    Returns whether the JMS message corresponds to the result of a management operation invocation.
  • isAttributesResult
    Returns whether the JMS message corresponds to the result of a management attribute value.
  • retrieveOperationParameters
    Used by ActiveMQ Artemis management service.
  • storeResult
    Used by ActiveMQ Artemis management service.

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • addToBackStack (FragmentTransaction)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Collectors (java.util.stream)
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now