/** * Used by ActiveMQ Artemis management service. */ public static void storeResult(final CoreMessage message, final Object result) throws Exception { String resultString; if (result != null) { // Result is stored in body, also encoded as JSON array of length 1 JsonArray jsonArray = JsonUtil.toJSONArray(new Object[]{result}); resultString = jsonArray.toString(); } else { resultString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(resultString)); }
JsonArray objectArray = toJSONArray((Object[]) val); jsonObject.add(key, objectArray); } else { jsonArray.add(jsonObject); } else { jsonArray.add(toJSONArray(innerArray));
/** * Stores an operation invocation in a message to invoke the corresponding operation the value from the server resource. * * @param message message * @param resourceName the name of the server resource * @param operationName the name of the operation to invoke on the server resource * @param parameters the parameters to use to invoke the server resource * @see ResourceNames */ public static void putOperationInvocation(final ICoreMessage message, final String resourceName, final String operationName, final Object... parameters) throws Exception { // store the name of the operation in the headers message.putStringProperty(ManagementHelper.HDR_RESOURCE_NAME, new SimpleString(resourceName)); message.putStringProperty(ManagementHelper.HDR_OPERATION_NAME, new SimpleString(operationName)); // and the params go in the body, since might be too large for header String paramString; if (parameters != null) { JsonArray jsonArray = JsonUtil.toJSONArray(parameters); paramString = jsonArray.toString(); } else { paramString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(paramString)); }
/** * Used by ActiveMQ Artemis management service. */ public static void storeResult(final CoreMessage message, final Object result) throws Exception { String resultString; if (result != null) { // Result is stored in body, also encoded as JSON array of length 1 JsonArray jsonArray = JsonUtil.toJSONArray(new Object[]{result}); resultString = jsonArray.toString(); } else { resultString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(resultString)); }
/** * Used by ActiveMQ Artemis management service. */ public static void storeResult(final CoreMessage message, final Object result) throws Exception { String resultString; if (result != null) { // Result is stored in body, also encoded as JSON array of length 1 JsonArray jsonArray = JsonUtil.toJSONArray(new Object[]{result}); resultString = jsonArray.toString(); } else { resultString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(resultString)); }
/** * Used by ActiveMQ Artemis management service. */ public static void storeResult(final CoreMessage message, final Object result) throws Exception { String resultString; if (result != null) { // Result is stored in body, also encoded as JSON array of length 1 JsonArray jsonArray = JsonUtil.toJSONArray(new Object[]{result}); resultString = jsonArray.toString(); } else { resultString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(resultString)); }
/** * Used by ActiveMQ Artemis management service. */ public static void storeResult(final CoreMessage message, final Object result) throws Exception { String resultString; if (result != null) { // Result is stored in body, also encoded as JSON array of length 1 JsonArray jsonArray = JsonUtil.toJSONArray(new Object[]{result}); resultString = jsonArray.toString(); } else { resultString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(resultString)); }
/** * Used by ActiveMQ Artemis management service. */ public static void storeResult(final CoreMessage message, final Object result) throws Exception { String resultString; if (result != null) { // Result is stored in body, also encoded as JSON array of length 1 JsonArray jsonArray = JsonUtil.toJSONArray(new Object[]{result}); resultString = jsonArray.toString(); } else { resultString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(resultString)); }
/** * Used by ActiveMQ Artemis management service. */ public static void storeResult(final CoreMessage message, final Object result) throws Exception { String resultString; if (result != null) { // Result is stored in body, also encoded as JSON array of length 1 JsonArray jsonArray = JsonUtil.toJSONArray(new Object[]{result}); resultString = jsonArray.toString(); } else { resultString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(resultString)); }
JsonArray objectArray = toJSONArray((Object[]) val); jsonObject.add(key, objectArray); } else { jsonArray.add(jsonObject); } else { jsonArray.add(toJSONArray(innerArray));
JsonArray objectArray = toJSONArray((Object[]) val); jsonObject.add(key, objectArray); } else { jsonArray.add(jsonObject); } else { jsonArray.add(toJSONArray(innerArray));
JsonArray objectArray = toJSONArray((Object[]) val); jsonObject.add(key, objectArray); } else { jsonArray.add(jsonObject); } else { jsonArray.add(toJSONArray(innerArray));
JsonArray objectArray = toJSONArray((Object[]) val); jsonObject.add(key, objectArray); } else { jsonArray.add(jsonObject); } else { jsonArray.add(toJSONArray(innerArray));
JsonArray objectArray = toJSONArray((Object[]) val); jsonObject.add(key, objectArray); } else { jsonArray.add(jsonObject); } else { jsonArray.add(toJSONArray(innerArray));
/** * Stores an operation invocation in a message to invoke the corresponding operation the value from the server resource. * * @param message message * @param resourceName the name of the server resource * @param operationName the name of the operation to invoke on the server resource * @param parameters the parameters to use to invoke the server resource * @see ResourceNames */ public static void putOperationInvocation(final ICoreMessage message, final String resourceName, final String operationName, final Object... parameters) throws Exception { // store the name of the operation in the headers message.putStringProperty(ManagementHelper.HDR_RESOURCE_NAME, new SimpleString(resourceName)); message.putStringProperty(ManagementHelper.HDR_OPERATION_NAME, new SimpleString(operationName)); // and the params go in the body, since might be too large for header String paramString; if (parameters != null) { JsonArray jsonArray = JsonUtil.toJSONArray(parameters); paramString = jsonArray.toString(); } else { paramString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(paramString)); }
/** * Stores an operation invocation in a message to invoke the corresponding operation the value from the server resource. * * @param message message * @param resourceName the name of the server resource * @param operationName the name of the operation to invoke on the server resource * @param parameters the parameters to use to invoke the server resource * @see ResourceNames */ public static void putOperationInvocation(final ICoreMessage message, final String resourceName, final String operationName, final Object... parameters) throws Exception { // store the name of the operation in the headers message.putStringProperty(ManagementHelper.HDR_RESOURCE_NAME, new SimpleString(resourceName)); message.putStringProperty(ManagementHelper.HDR_OPERATION_NAME, new SimpleString(operationName)); // and the params go in the body, since might be too large for header String paramString; if (parameters != null) { JsonArray jsonArray = JsonUtil.toJSONArray(parameters); paramString = jsonArray.toString(); } else { paramString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(paramString)); }
/** * Stores an operation invocation in a message to invoke the corresponding operation the value from the server resource. * * @param message message * @param resourceName the name of the server resource * @param operationName the name of the operation to invoke on the server resource * @param parameters the parameters to use to invoke the server resource * @see ResourceNames */ public static void putOperationInvocation(final ICoreMessage message, final String resourceName, final String operationName, final Object... parameters) throws Exception { // store the name of the operation in the headers message.putStringProperty(ManagementHelper.HDR_RESOURCE_NAME, new SimpleString(resourceName)); message.putStringProperty(ManagementHelper.HDR_OPERATION_NAME, new SimpleString(operationName)); // and the params go in the body, since might be too large for header String paramString; if (parameters != null) { JsonArray jsonArray = JsonUtil.toJSONArray(parameters); paramString = jsonArray.toString(); } else { paramString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(paramString)); }
/** * Stores an operation invocation in a message to invoke the corresponding operation the value from the server resource. * * @param message message * @param resourceName the name of the server resource * @param operationName the name of the operation to invoke on the server resource * @param parameters the parameters to use to invoke the server resource * @see ResourceNames */ public static void putOperationInvocation(final ICoreMessage message, final String resourceName, final String operationName, final Object... parameters) throws Exception { // store the name of the operation in the headers message.putStringProperty(ManagementHelper.HDR_RESOURCE_NAME, new SimpleString(resourceName)); message.putStringProperty(ManagementHelper.HDR_OPERATION_NAME, new SimpleString(operationName)); // and the params go in the body, since might be too large for header String paramString; if (parameters != null) { JsonArray jsonArray = JsonUtil.toJSONArray(parameters); paramString = jsonArray.toString(); } else { paramString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(paramString)); }
/** * Stores an operation invocation in a message to invoke the corresponding operation the value from the server resource. * * @param message message * @param resourceName the name of the server resource * @param operationName the name of the operation to invoke on the server resource * @param parameters the parameters to use to invoke the server resource * @see ResourceNames */ public static void putOperationInvocation(final ICoreMessage message, final String resourceName, final String operationName, final Object... parameters) throws Exception { // store the name of the operation in the headers message.putStringProperty(ManagementHelper.HDR_RESOURCE_NAME, new SimpleString(resourceName)); message.putStringProperty(ManagementHelper.HDR_OPERATION_NAME, new SimpleString(operationName)); // and the params go in the body, since might be too large for header String paramString; if (parameters != null) { JsonArray jsonArray = JsonUtil.toJSONArray(parameters); paramString = jsonArray.toString(); } else { paramString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(paramString)); }
/** * Stores an operation invocation in a message to invoke the corresponding operation the value from the server resource. * * @param message message * @param resourceName the name of the server resource * @param operationName the name of the operation to invoke on the server resource * @param parameters the parameters to use to invoke the server resource * @see ResourceNames */ public static void putOperationInvocation(final ICoreMessage message, final String resourceName, final String operationName, final Object... parameters) throws Exception { // store the name of the operation in the headers message.putStringProperty(ManagementHelper.HDR_RESOURCE_NAME, new SimpleString(resourceName)); message.putStringProperty(ManagementHelper.HDR_OPERATION_NAME, new SimpleString(operationName)); // and the params go in the body, since might be too large for header String paramString; if (parameters != null) { JsonArray jsonArray = JsonUtil.toJSONArray(parameters); paramString = jsonArray.toString(); } else { paramString = null; } message.getBodyBuffer().writeNullableSimpleString(SimpleString.toSimpleString(paramString)); }