Examples of GetNumberReply


Examples of org.objectweb.joram.shared.admin.GetNumberReply

    } else if (adminRequest instanceof ClearQueue) {
      clearQueue(not.getReplyTo(),
                 not.getRequestMsgId(),
                 not.getReplyMsgId());
    } else if (adminRequest instanceof GetNbMaxMsgRequest) {
      replyToTopic(new GetNumberReply(getNbMaxMsg()),
                   not.getReplyTo(),
                   not.getRequestMsgId(),
                   not.getReplyMsgId());
    } else if (adminRequest instanceof GetPendingMessages) {
      // Cleaning of the possibly expired messages.
      DMQManager dmqManager = cleanPendingMessage(System.currentTimeMillis());
      // Sending the dead messages to the DMQ, if needed:
      if (dmqManager != null) dmqManager.sendToDMQ();
     
      replyToTopic(new GetNumberReply(getPendingMessageCount()),
                   not.getReplyTo(),
                   not.getRequestMsgId(),
                   not.getReplyMsgId());
    } else if (adminRequest instanceof GetPendingRequests) {
      // Cleaning of the possibly expired requests.
      cleanWaitingRequest(System.currentTimeMillis());
      replyToTopic(new GetNumberReply(getWaitingRequestCount()),
                   not.getReplyTo(),
                   not.getRequestMsgId(),
                   not.getReplyMsgId());
    } else if (adminRequest instanceof GetDMQSettingsRequest) {
      replyToTopic(new GetDMQSettingsReply((dmqId != null)?dmqId.toString():null, threshold),
View Full Code Here

Examples of org.objectweb.joram.shared.admin.GetNumberReply

   * @exception AdminException  If the request fails.
   */
  public int getNbMaxMsg(String subName) throws ConnectException, AdminException {
    //  TODO: Subscription sub = getSubscription(subName);
    GetNbMaxMsgRequest request = new GetNbMaxMsgRequest(proxyId, subName);
    GetNumberReply reply = (GetNumberReply) doRequest(request);
    return reply.getNumber();
  }
View Full Code Here

Examples of org.objectweb.joram.shared.admin.GetNumberReply

   * @exception ConnectException  If the admin connection is closed or broken.
   * @exception AdminException  If the request fails.
   */
  public int getSubscriptions() throws ConnectException, AdminException {
    GetSubscriptionsRequest request = new GetSubscriptionsRequest(agentId);
    GetNumberReply reply = (GetNumberReply) doRequest(request);
    return reply.getNumber();
  }
View Full Code Here

Examples of org.objectweb.joram.shared.admin.GetNumberReply

   
    if (adminRequest instanceof GetSubscriberIds) {
      replyToTopic(new GetSubscriberIdsRep(getSubscriberIds()),
                   not.getReplyTo(), not.getRequestMsgId(), not.getReplyMsgId());
    } else if (adminRequest instanceof GetSubscriptionsRequest) {
      replyToTopic(new GetNumberReply(getNumberOfSubscribers()),
                   not.getReplyTo(), not.getRequestMsgId(), not.getReplyMsgId());
    } else if (adminRequest instanceof GetDMQSettingsRequest) {
      replyToTopic(new GetDMQSettingsReply((dmqId != null)?dmqId.toString():null, 0),
                   not.getReplyTo(), not.getRequestMsgId(), not.getReplyMsgId());
    } else if (adminRequest instanceof SetFather) {
View Full Code Here

Examples of org.objectweb.joram.shared.admin.GetNumberReply

      int nbMaxMsg = -1;
      ClientSubscription sub = (ClientSubscription) subsTable.get(request.getSubName());
      if (sub != null)
        nbMaxMsg = sub.getNbMaxMsg();

      replyToTopic(new GetNumberReply(nbMaxMsg), not.getReplyTo(), not.getRequestMsgId(), not.getReplyMsgId());
    } else if (adminRequest instanceof GetDMQSettingsRequest) {
      replyToTopic(new GetDMQSettingsReply((dmqId != null) ? dmqId.toString() : null, threshold),
          not.getReplyTo(), not.getRequestMsgId(), not.getReplyMsgId());
    } else if (adminRequest instanceof SetDMQRequest) {
      setSave();
View Full Code Here

Examples of org.objectweb.joram.shared.admin.GetNumberReply

   * @exception ConnectException  If the admin connection is closed or broken.
   * @exception AdminException  If the request fails.
   */
  public int getNbMaxMsg()  throws ConnectException, AdminException {
    GetNbMaxMsgRequest request = new GetNbMaxMsgRequest(agentId);
    GetNumberReply reply = (GetNumberReply) doRequest(request);
    return reply.getNumber();
  }
View Full Code Here

Examples of org.objectweb.joram.shared.admin.GetNumberReply

   * @exception ConnectException  If the admin connection is closed or broken.
   * @exception AdminException  If the request fails.
   */
  public int getPendingMessages() throws ConnectException, AdminException {
    GetPendingMessages request = new GetPendingMessages(agentId);
    GetNumberReply reply;
    reply = (GetNumberReply) doRequest(request);

    return reply.getNumber();
  }
View Full Code Here

Examples of org.objectweb.joram.shared.admin.GetNumberReply

   * @exception ConnectException  If the admin connection is closed or broken.
   * @exception AdminException  If the request fails.
   */
  public int getPendingRequests() throws ConnectException, AdminException {
    GetPendingRequests request = new GetPendingRequests(agentId);
    GetNumberReply reply = (GetNumberReply) doRequest(request);

    return reply.getNumber();
  }
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.