public void oneway(Object o) throws IOException { Command command = (Command)o; command.setCommandId(sequenceGenerator.getNextSequenceId()); command.setResponseRequired(false); next.oneway(command); }
public FutureResponse asyncRequest(Object o, ResponseCallback responseCallback) throws IOException { Command command = (Command) o; command.setCommandId(sequenceGenerator.getNextSequenceId()); command.setResponseRequired(true); FutureResponse future = new FutureResponse(responseCallback, this); IOException priorError = null; synchronized (requestMap) { priorError = this.error; if (priorError == null) { requestMap.put(new Integer(command.getCommandId()), future); } } if (priorError != null) { future.set(new ExceptionResponse(priorError)); throw priorError; } next.oneway(command); return future; }
void sendToActiveMQ(Command command, ResponseHandler handler) { command.setCommandId(lastCommandId.incrementAndGet()); if (handler != null) { command.setResponseRequired(true); resposeHandlers.put(Integer.valueOf(command.getCommandId()), handler); } amqpTransport.sendToActiveMQ(command); }
void sendToActiveMQ(Command command, ResponseHandler handler) { command.setCommandId(lastCommandId.incrementAndGet()); if (handler != null) { command.setResponseRequired(true); resposeHandlers.put(Integer.valueOf(command.getCommandId()), handler); } amqpTransport.sendToActiveMQ(command); }
protected void sendToActiveMQ(Command command, ResponseHandler handler) { command.setCommandId(generateCommandId()); if (handler != null) { command.setResponseRequired(true); resposeHandlers.put(Integer.valueOf(command.getCommandId()), handler); } stompTransport.sendToActiveMQ(command); }
protected void sendToActiveMQ(Command command, ResponseHandler handler) { command.setCommandId(generateCommandId()); if (handler != null) { command.setResponseRequired(true); resposeHandlers.put(Integer.valueOf(command.getCommandId()), handler); } stompTransport.sendToActiveMQ(command); }
protected void sendToActiveMQ(Command command, ResponseHandler handler) { command.setCommandId(generateCommandId()); if (handler != null) { command.setResponseRequired(true); resposeHandlers.put(Integer.valueOf(command.getCommandId()), handler); } stompTransport.sendToActiveMQ(command); }
protected void sendToActiveMQ(Command command, ResponseHandler handler) { command.setCommandId(generateCommandId()); if (handler != null) { command.setResponseRequired(true); resposeHandlers.put(Integer.valueOf(command.getCommandId()), handler); } stompTransport.sendToActiveMQ(command); }
public void oneway(Object o) throws IOException { Command command = (Command)o; command.setCommandId(sequenceGenerator.getNextSequenceId()); command.setResponseRequired(false); next.oneway(command); }
public void oneway(Object o) throws IOException { Command command = (Command)o; command.setCommandId(sequenceGenerator.getNextSequenceId()); command.setResponseRequired(false); next.oneway(command); }
public void oneway(Object o) throws IOException { Command command = (Command)o; command.setCommandId(sequenceGenerator.getNextSequenceId()); command.setResponseRequired(false); next.oneway(command); }
protected void sendToActiveMQ(Command command, ResponseHandler handler) { command.setCommandId(generateCommandId()); if (handler != null) { command.setResponseRequired(true); resposeHandlers.put(command.getCommandId(), handler); } stompTransport.sendToActiveMQ(command); }
protected void sendToActiveMQ(Command command, ResponseHandler handler) { command.setCommandId(generateCommandId()); if (handler != null) { command.setResponseRequired(true); resposeHandlers.put(command.getCommandId(), handler); } stompTransport.sendToActiveMQ(command); }
public void oneway(Object o) throws IOException { Command command = (Command)o; command.setCommandId(sequenceGenerator.getNextSequenceId()); command.setResponseRequired(false); next.oneway(command); }
protected void sendToActiveMQ(Command command, Handler<Response> handler) { command.setCommandId(generateCommandId()); if (handler != null) { command.setResponseRequired(true); responseHandlers.put(command.getCommandId(), handler); } transport.getTransportListener().onCommand(command); }
public FutureResponse asyncRequest(Object o, ResponseCallback responseCallback) throws IOException { Command command = (Command) o; command.setCommandId(sequenceGenerator.getNextSequenceId()); command.setResponseRequired(true); FutureResponse future = new FutureResponse(responseCallback, this); IOException priorError = null; synchronized (requestMap) { priorError = this.error; if (priorError == null) { requestMap.put(new Integer(command.getCommandId()), future); } } if (priorError != null) { future.set(new ExceptionResponse(priorError)); throw priorError; } next.oneway(command); return future; }
public FutureResponse asyncRequest(Object o, ResponseCallback responseCallback) throws IOException { Command command = (Command) o; command.setCommandId(sequenceGenerator.getNextSequenceId()); command.setResponseRequired(true); FutureResponse future = new FutureResponse(responseCallback, this); IOException priorError = null; synchronized (requestMap) { priorError = this.error; if (priorError == null) { requestMap.put(new Integer(command.getCommandId()), future); } } if (priorError != null) { future.set(new ExceptionResponse(priorError)); throw priorError; } next.oneway(command); return future; }
public FutureResponse asyncRequest(Object o, ResponseCallback responseCallback) throws IOException { Command command = (Command) o; command.setCommandId(sequenceGenerator.getNextSequenceId()); command.setResponseRequired(true); FutureResponse future = new FutureResponse(responseCallback, this); IOException priorError = null; synchronized (requestMap) { priorError = this.error; if (priorError == null) { requestMap.put(new Integer(command.getCommandId()), future); } } if (priorError != null) { future.set(new ExceptionResponse(priorError)); throw priorError; } next.oneway(command); return future; }
public FutureResponse asyncRequest(Object o, ResponseCallback responseCallback) throws IOException { Command command = (Command) o; command.setCommandId(sequenceGenerator.getNextSequenceId()); command.setResponseRequired(true); FutureResponse future = new FutureResponse(responseCallback); IOException priorError = null; synchronized (requestMap) { priorError = this.error; if (priorError == null) { requestMap.put(new Integer(command.getCommandId()), future); } } if (priorError != null) { future.set(new ExceptionResponse(priorError)); throw priorError; } next.oneway(command); return future; }
public void sendToActiveMQ(Command command, ResponseHandler handler) { // Lets intercept message send requests.. if (command instanceof ActiveMQMessage) { ActiveMQMessage msg = (ActiveMQMessage) command; if (!getPublishDollarTopics() && msg.getDestination().getPhysicalName().startsWith("$")) { // We don't allow users to send to $ prefixed topics to avoid failing MQTT 3.1.1 // specification requirements for system assigned destinations. if (handler != null) { try { handler.onResponse(this, new Response()); } catch (IOException e) { e.printStackTrace(); } } return; } } command.setCommandId(generateCommandId()); if (handler != null) { command.setResponseRequired(true); resposeHandlers.put(command.getCommandId(), handler); } getMQTTTransport().sendToActiveMQ(command); }