public static ActiveMQException createException(int code, String msg) { return getType(code).createException(msg); }
@Override public void decodeRest(final ActiveMQBuffer buffer) { int code = buffer.readInt(); String msg = buffer.readNullableString(); exception = ActiveMQExceptionType.createException(code, msg); }
@Override public void waitCompletion() throws InterruptedException, ActiveMQException { while (true) { if (latch.await(2, TimeUnit.SECONDS)) break; } if (errorMessage != null) { throw ActiveMQExceptionType.createException(errorCode, errorMessage); } return; }
public boolean waitCompletion(final long timeout) throws InterruptedException, ActiveMQException { boolean retValue = latch.await(timeout, TimeUnit.MILLISECONDS); if (errorMessage != null) { throw ActiveMQExceptionType.createException(errorCode, errorMessage); } return retValue; }
@Override public void waitCompletion() throws InterruptedException, ActiveMQException { while (true) { if (latch.await(2, TimeUnit.SECONDS)) break; } if (errorMessage != null) { throw ActiveMQExceptionType.createException(errorCode, errorMessage); } return; }
public boolean waitCompletion(final long timeout) throws InterruptedException, ActiveMQException { boolean retValue = latch.await(timeout, TimeUnit.MILLISECONDS); if (errorMessage != null) { throw ActiveMQExceptionType.createException(errorCode, errorMessage); } return retValue; }
public synchronized void destroyService(String name) throws Exception { if (!connectors.containsKey(name)) { throw ActiveMQExceptionType.GENERIC_EXCEPTION.createException("Connector service " + name + " does not exist"); } ConnectorService connectorService = connectors.get(name); connectorService.stop(); connectors.remove(name); }
@Override public void onError(final int errorCode, final String errorMessage) { ActiveMQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); Packet exceptionPacket = convertToExceptionPacket(confirmPacket, ActiveMQExceptionType.createException(errorCode, errorMessage)); doConfirmAndResponse(confirmPacket, exceptionPacket, flush, closeChannel); if (logger.isTraceEnabled()) { logger.trace("ServerSessionPacketHandler::exception response sent::" + exceptionPacket); } }
public static ActiveMQException createException(int code, String msg) { return getType(code).createException(msg); }
public static ActiveMQException createException(int code, String msg) { return getType(code).createException(msg); }
@Override public void decodeRest(final ActiveMQBuffer buffer) { int code = buffer.readInt(); String msg = buffer.readNullableString(); exception = ActiveMQExceptionType.createException(code, msg); }
@Override public void decodeRest(final ActiveMQBuffer buffer) { int code = buffer.readInt(); String msg = buffer.readNullableString(); exception = ActiveMQExceptionType.createException(code, msg); }
@Override public void decodeRest(final ActiveMQBuffer buffer) { int code = buffer.readInt(); String msg = buffer.readNullableString(); exception = ActiveMQExceptionType.createException(code, msg); }
@Override public void decodeRest(final ActiveMQBuffer buffer) { int code = buffer.readInt(); String msg = buffer.readNullableString(); exception = ActiveMQExceptionType.createException(code, msg); }
@Override public void decodeRest(final ActiveMQBuffer buffer) { int code = buffer.readInt(); String msg = buffer.readNullableString(); exception = ActiveMQExceptionType.createException(code, msg); }
@Override public void decodeRest(final ActiveMQBuffer buffer) { int code = buffer.readInt(); String msg = buffer.readNullableString(); exception = ActiveMQExceptionType.createException(code, msg); }
public void checkErrorCondition() throws Exception { if (currentCallback != null) { if (currentCallback.getErrorMessage() != null) { throw ActiveMQExceptionType.createException(currentCallback.getErrorCode(), currentCallback.getErrorMessage()); } } }
public void checkErrorCondition() throws Exception { if (currentCallback != null) { if (currentCallback.getErrorMessage() != null) { throw ActiveMQExceptionType.createException(currentCallback.getErrorCode(), currentCallback.getErrorMessage()); } } }
@Override public void onError(final int errorCode, final String errorMessage) { ActiveMQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); ActiveMQStompException e = new ActiveMQStompException("Error sending reply", ActiveMQExceptionType.createException(errorCode, errorMessage)).setHandler(connection.getFrameHandler()); StompFrame error = e.getFrame(); send(connection, error); }
@Override public void onError(final int errorCode, final String errorMessage) { ActiveMQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); ActiveMQStompException e = new ActiveMQStompException("Error sending reply", ActiveMQExceptionType.createException(errorCode, errorMessage)).setHandler(connection.getFrameHandler()); StompFrame error = e.getFrame(); send(connection, error); }