Package org.activemq.message

Examples of org.activemq.message.CapacityInfo


          }
        } catch (JMSException jmsEx) {
          handleAsyncException(jmsEx);
        }
      } else if (packet.getPacketType() == Packet.CAPACITY_INFO) {
        CapacityInfo info = (CapacityInfo) packet;
        flowControlSleepTime = info.getFlowControlTimeout();
        // System.out.println("SET FLOW TIMEOUT = " +
        // flowControlSleepTime + " FOR " + info);
      } else if (packet.getPacketType() == Packet.KEEP_ALIVE
          && packet.isReceiptRequired()) {
        Receipt receipt = new Receipt();
View Full Code Here


   *
   * @param event
   */
  public void capacityChanged(CapacityMonitorEvent event) {
    // send the event to broker ...
    CapacityInfo info = new CapacityInfo();
    info.setResourceName(event.getMonitorName());
    info.setCapacity(event.getCapacity());
    // System.out.println("Cap changed: " + event);
    try {
      asyncSendPacket(info, false);
    } catch (JMSException e) {
      JMSException jmsEx = new JMSException(
View Full Code Here

          }
        } catch (JMSException jmsEx) {
          handleAsyncException(jmsEx);
        }
      } else if (packet.getPacketType() == Packet.CAPACITY_INFO) {
        CapacityInfo info = (CapacityInfo) packet;
        flowControlSleepTime = info.getFlowControlTimeout();
        // System.out.println("SET FLOW TIMEOUT = " +
        // flowControlSleepTime + " FOR " + info);
      } else if (packet.getPacketType() == Packet.KEEP_ALIVE
          && packet.isReceiptRequired()) {
        Receipt receipt = new Receipt();
View Full Code Here

   *
   * @param event
   */
  public void capacityChanged(CapacityMonitorEvent event) {
    // send the event to broker ...
    CapacityInfo info = new CapacityInfo();
    info.setResourceName(event.getMonitorName());
    info.setCapacity(event.getCapacity());
    // System.out.println("Cap changed: " + event);
    try {
      asyncSendPacket(info, false);
    } catch (JMSException e) {
      JMSException jmsEx = new JMSException(
View Full Code Here

          }
        } catch (JMSException jmsEx) {
          handleAsyncException(jmsEx);
        }
      } else if (packet.getPacketType() == Packet.CAPACITY_INFO) {
        CapacityInfo info = (CapacityInfo) packet;
        flowControlSleepTime = info.getFlowControlTimeout();
        // System.out.println("SET FLOW TIMEOUT = " +
        // flowControlSleepTime + " FOR " + info);
      } else if (packet.getPacketType() == Packet.KEEP_ALIVE
          && packet.isReceiptRequired()) {
        Receipt receipt = new Receipt();
View Full Code Here

   *
   * @param event
   */
  public void capacityChanged(CapacityMonitorEvent event) {
    // send the event to broker ...
    CapacityInfo info = new CapacityInfo();
    info.setResourceName(event.getMonitorName());
    info.setCapacity(event.getCapacity());
    // System.out.println("Cap changed: " + event);
    try {
      asyncSendPacket(info, false);
    } catch (JMSException e) {
      JMSException jmsEx = new JMSException(
View Full Code Here

                            DurableUnsubscribe ds = (DurableUnsubscribe) packet;
                            brokerConnector.durableUnsubscribe(this, ds);
                            break;
                        }
                        case Packet.CAPACITY_INFO : {
                            CapacityInfo info = (CapacityInfo) packet;
                            consumeCapacityInfo(info);
                            break;
                        }
                        case Packet.CAPACITY_INFO_REQUEST : {
                            updateCapacityInfo(packet.getId());
View Full Code Here

     * Update the peer Connection about the Broker's capacity for messages
     *
     * @param capacity
     */
    public void updateBrokerCapacity(int capacity) {
        CapacityInfo info = new CapacityInfo();
        info.setResourceName(this.brokerConnector.getBrokerInfo().getBrokerName());
        info.setCapacity(capacity);
        info.setFlowControlTimeout(getFlowControlTimeout(capacity));
        send(info);
    }
View Full Code Here

    private void consumeCapacityInfo(CapacityInfo info) {
        this.capacity = info.getCapacity();
    }

    private void updateCapacityInfo(short correlationId) {
        CapacityInfo info = new CapacityInfo();
        info.setResourceName(this.brokerConnector.getBrokerInfo().getBrokerName());
        info.setCorrelationId(correlationId);
        info.setCapacity(this.brokerConnector.getBrokerCapacity());
        info.setFlowControlTimeout(getFlowControlTimeout(info.getCapacity()));
        send(info);
    }
View Full Code Here

          }
        } catch (JMSException jmsEx) {
          handleAsyncException(jmsEx);
        }
      } else if (packet.getPacketType() == Packet.CAPACITY_INFO) {
        CapacityInfo info = (CapacityInfo) packet;
        flowControlSleepTime = info.getFlowControlTimeout();
        // System.out.println("SET FLOW TIMEOUT = " +
        // flowControlSleepTime + " FOR " + info);
      } else if (packet.getPacketType() == Packet.KEEP_ALIVE
          && packet.isReceiptRequired()) {
        Receipt receipt = new Receipt();
View Full Code Here

TOP

Related Classes of org.activemq.message.CapacityInfo

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.