コード例 #1
0
  public void process(Message message, String command) throws Exception {
    if (processThread == null) {
      processThread = new ProcessThread();

      processThread.setCommand(command);
      processThread.setMessage(message);

      processThread.run();
    }

    if (Validator.isNotNull(processMessageResponse)) {
      message.setPayload(processMessageResponse);

      if (!processMessageResponse.equals(MESSAGE_RESPONSE_WAIT)) {
        processMessageResponse = null;

        processThread.join();

        processThread = null;
      }
    } else {
      message.setPayload(MESSAGE_RESPONSE_WAIT);
    }

    MessageBusUtil.sendMessage(message.getResponseDestinationName(), message);
  }
コード例 #2
0
  @Override
  protected void doReceive(Message message) throws Exception {
    long userId = message.getLong("userId");

    Map<String, Boolean> results = TestPACLUtil.testCurrentThread(userId);

    message.setPayload(results);

    MessageBusUtil.sendMessage(message.getResponseDestinationName(), message);
  }
コード例 #3
0
  @Override
  protected void doReceive(Message message) throws Exception {
    message.setPayload(getResults(message));

    MessageBusUtil.sendMessage(message.getResponseDestinationName(), message);
  }