Package org.apache.helix.messaging.handling

Examples of org.apache.helix.messaging.handling.MessageHandler.handleMessage()


    msg.setTgtSessionId("*");
    msg.setCorrelationId(corrId);
   
    MessageHandler aHandler = svc.createHandler(msg, changeContext);
    Map<String, String> resultMap = new HashMap<String, String>();
    aHandler.handleMessage();
   
    AssertJUnit.assertTrue(callback.isDone());
    AssertJUnit.assertTrue(callback._repliedMessageId.contains(msg.getMsgId()));
  }
}
View Full Code Here


    msg.setTgtSessionId("*");
    msg.setCorrelationId(corrId);

    MessageHandler aHandler = svc.createHandler(msg, changeContext);
    Map<String, String> resultMap = new HashMap<String, String>();
    aHandler.handleMessage();

    AssertJUnit.assertTrue(callback.isDone());
    AssertJUnit.assertTrue(callback._repliedMessageId.contains(msg.getMsgId()));
  }
}
View Full Code Here

    if (handler == null) {
      throw new HelixException("Task message " + taskMessage.getMsgType()
          + " handler not found, task id " + _partitionName);
    }
    // Invoke the internal handler to complete the task
    handler.handleMessage();
    logger.info(_partitionName + " onBecomeCompletedFromOffline completed");
  }

  @Transition(to = "OFFLINE", from = "COMPLETED")
  public void onBecomeOfflineFromCompleted(Message message, NotificationContext context) {
View Full Code Here

    if (handler == null) {
      throw new HelixException("Task message " + taskMessage.getMsgType()
          + " handler not found, task id " + _partition);
    }
    // Invoke the internal handler to complete the task
    handler.handleMessage();
    logger.info(_partition + " onBecomeCompletedFromOffline completed");
  }

  @Transition(to = "OFFLINE", from = "COMPLETED")
  public void onBecomeOfflineFromCompleted(Message message, NotificationContext context) {
View Full Code Here

    msg = new Message(svc.getMessageType(), MessageId.from(UUID.randomUUID().toString()));
    msg.setTgtSessionId(SessionId.from("*"));
    msg.setCorrelationId(corrId);

    MessageHandler aHandler = svc.createHandler(msg, changeContext);
    aHandler.handleMessage();

    AssertJUnit.assertTrue(callback.isDone());
    AssertJUnit.assertTrue(callback._repliedMessageId.contains(msg.getMessageId()));
  }
}
View Full Code Here

    if (handler == null) {
      throw new HelixException("Task message " + taskMessage.getMsgType()
          + " handler not found, task id " + _partitionName);
    }
    // Invoke the internal handler to complete the task
    handler.handleMessage();
    logger.info(_partitionName + " onBecomeCompletedFromOffline completed");
  }

  @Transition(to = "OFFLINE", from = "COMPLETED")
  public void onBecomeOfflineFromCompleted(Message message, NotificationContext context) {
View Full Code Here

    msg.setTgtSessionId(SessionId.from("*"));
    msg.setCorrelationId(corrId);

    MessageHandler aHandler = svc.createHandler(msg, changeContext);
    Map<String, String> resultMap = new HashMap<String, String>();
    aHandler.handleMessage();

    AssertJUnit.assertTrue(callback.isDone());
    AssertJUnit.assertTrue(callback._repliedMessageId.contains(msg.getMessageId()));
  }
}
View Full Code Here

    if (handler == null)
    {
      throw new HelixException("Task message " + taskMessage.getMsgType() + " handler not found, task id " + _partitionName);
    }
    // Invoke the internal handler to complete the task
    handler.handleMessage();
    logger.info(_partitionName + " onBecomeCompletedFromOffline completed");
  }
 
  @Transition(to="OFFLINE",from="COMPLETED")
  public void onBecomeOfflineFromCompleted(Message message,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.