Package org.objectweb.joram.shared.messages

Examples of org.objectweb.joram.shared.messages.Message


  protected void replyToTopic(AdminReply reply,
                              AgentId replyTo,
                              String requestMsgId,
                              String replyMsgId) {
    Message message = MessageHelper.createMessage(replyMsgId, requestMsgId, getAgentId(), getType());
    try {
      message.setAdminMessage(reply);
      ClientMessages clientMessages = new ClientMessages(-1, -1, message);
      forward(replyTo, clientMessages);
    } catch (Exception exc) {
      if (logger.isLoggable(BasicLevel.ERROR))
        logger.log(BasicLevel.ERROR, "", exc);
View Full Code Here


    if (not == null) return;

    Iterator messages = not.getMessages().iterator();

    while (messages.hasNext()) {
      Message msg = (Message) messages.next();
      nbMsgsReceiveSinceCreation += 1;

      String msgId = msg.id;
      AgentId replyTo = AgentId.fromString(msg.replyToId);
      AdminRequest request = (AdminRequest) msg.getAdminMessage();

      if (logger.isLoggable(BasicLevel.DEBUG))
        logger.log(BasicLevel.DEBUG, "--- " + this + ": got " + request);

      if (request == null) {
View Full Code Here

    if (logger.isLoggable(BasicLevel.DEBUG))
      logger.log(BasicLevel.DEBUG, "AdminTopic.distributeReply(" + to + ',' + msgId + ',' + reply + ')');

    if (to == null) return;

    Message message = MessageHelper.createMessage(createMessageId(), msgId, getAgentId(), getType());
    try {
      message.setAdminMessage(reply);
      ClientMessages clientMessages = new ClientMessages(-1, -1, message);
      forward(to, clientMessages);
      nbMsgsDeliverSinceCreation = nbMsgsDeliverSinceCreation + 1;
    } catch (Exception exc) {
      logger.log(BasicLevel.ERROR, "", exc);
View Full Code Here

   */
  public TopicMsgsReply(List messages) {
    long newExpiration = -1L;
    int newPriority = 0;
    for (Iterator iterator = messages.iterator(); iterator.hasNext();) {
      Message msg = (Message) iterator.next();
      if (newExpiration != 0L && (msg.expiration > newExpiration || msg.expiration == 0L)) {
        newExpiration = msg.expiration;
      }
      if (msg.priority > newPriority) {
        newPriority = msg.priority;
View Full Code Here

      this.setPriority(message.priority);
    } else {
      long newExpiration = -1L;
      int newPriority = 0;
      for (Iterator iterator = messages.iterator(); iterator.hasNext();) {
        Message msg = (Message) iterator.next();
        if (newExpiration != 0L && (msg.expiration > newExpiration || msg.expiration == 0L)) {
          newExpiration = msg.expiration;
        }
        if (msg.priority > newPriority) {
          newPriority = msg.priority;
View Full Code Here

TOP

Related Classes of org.objectweb.joram.shared.messages.Message

Copyright © 2018 www.massapicom. 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.