Examples of ManagedBroker


Examples of com.caucho.bam.broker.ManagedBroker

    public void onStart(WebSocketContext context) throws IOException
    {
      _in = new HmtpReader();
      _out = new HmtpWebSocketContextWriter(context);
     
      ManagedBroker broker = getBroker();
      Mailbox toLinkMailbox = new MultiworkerMailbox(_out.getAddress(), _out, broker, 1);
     
      _linkStream = new PassthroughBroker(toLinkMailbox);
      ClientStubManager clientManager = new ClientStubManager(broker, toLinkMailbox);
      _linkService = new ServerLinkActor(_linkStream, clientManager, _authManager, _ipAddress);
View Full Code Here

Examples of com.caucho.bam.broker.ManagedBroker

    _hmtpWriter = new HmtpWebSocketWriter(_rawWrite);
    // _hmtpWriter.setId(getRequestId());
    // _hmtpWriter.setAutoFlush(true);

    ManagedBroker broker = _bamService.getBroker();

    _hmtpWriter.setAddress("hmtp-server-" + _conn.getId() + "-hmtp");

    Mailbox toLinkMailbox = new MultiworkerMailbox(_hmtpWriter.getAddress(), _hmtpWriter, broker, 1);
    _toLinkBroker = new PassthroughBroker(toLinkMailbox);
View Full Code Here

Examples of org.apache.qpid.management.common.mbeans.ManagedBroker

     * that the attribute is exposed correctly through {@link ManagedQueue#getMaximumDeliveryCount()}.
     */
    public void testCreateQueueWithMaximumDeliveryCountSet() throws Exception
    {
        final String queueName = getName();
        final ManagedBroker managedBroker = _jmxUtils.getManagedBroker(VIRTUAL_HOST);

        final Integer deliveryCount = 1;
        final Map<String, Object> arguments = Collections.singletonMap(QueueArgumentsConverter.X_QPID_MAXIMUM_DELIVERY_COUNT, (Object)deliveryCount);
        managedBroker.createNewQueue(queueName, null, true, arguments);

        // Ensure the queue exists
        assertNotNull("Queue object name expected to exist", _jmxUtils.getQueueObjectName(VIRTUAL_HOST, queueName));
        assertNotNull("Manager queue expected to be available", _jmxUtils.getManagedQueue(queueName));

View Full Code Here

Examples of org.apache.qpid.management.common.mbeans.ManagedBroker

    }

    public void testCreateQueueWithAlertingThresholdsSet() throws Exception
    {
        final String queueName = getName();
        final ManagedBroker managedBroker = _jmxUtils.getManagedBroker(VIRTUAL_HOST);

        final Long maximumMessageCount = 100l;
        final Long maximumMessageSize = 200l;
        final Long maximumQueueDepth = 300l;
        final Long maximumMessageAge = 400l;
        final Map<String, Object> arguments = new HashMap<String, Object>();
        arguments.put(QueueArgumentsConverter.X_QPID_MAXIMUM_MESSAGE_COUNT, maximumMessageCount);
        arguments.put(QueueArgumentsConverter.X_QPID_MAXIMUM_MESSAGE_SIZE, maximumMessageSize);
        arguments.put(QueueArgumentsConverter.X_QPID_MAXIMUM_QUEUE_DEPTH, maximumQueueDepth);
        arguments.put(QueueArgumentsConverter.X_QPID_MAXIMUM_MESSAGE_AGE, maximumMessageAge);

        managedBroker.createNewQueue(queueName, null, true, arguments);

        // Ensure the queue exists
        assertNotNull("Queue object name expected to exist", _jmxUtils.getQueueObjectName(VIRTUAL_HOST, queueName));
        assertNotNull("Manager queue expected to be available", _jmxUtils.getManagedQueue(queueName));
View Full Code Here

Examples of org.apache.qpid.management.common.mbeans.ManagedBroker

     */
    public void testAlternateExchangeSurvivesRestart() throws Exception
    {
        String nonMandatoryExchangeName = "exch" + getName();

        final ManagedBroker managedBroker = _jmxUtils.getManagedBroker(VIRTUAL_HOST);
        managedBroker.createNewExchange(nonMandatoryExchangeName, "fanout", true);

        String queueName1 = getTestQueueName() + "1";
        String altExchange1 = "amq.fanout";
        String addr1WithAltExch = String.format("ADDR:%s;{create:always,node:{durable: true,type:queue,x-declare:{alternate-exchange:'%s'}}}", queueName1, altExchange1);
        Queue queue1 = _session.createQueue(addr1WithAltExch);
View Full Code Here

Examples of org.apache.qpid.management.common.mbeans.ManagedBroker

    }

    public void testGetMessageGroupKey() throws Exception
    {
        final String queueName = getName();
        final ManagedBroker managedBroker = _jmxUtils.getManagedBroker(VIRTUAL_HOST);

        final Object messageGroupKey = "test";
        final Map<String, Object> arguments = Collections.singletonMap(QueueArgumentsConverter.QPID_GROUP_HEADER_KEY, messageGroupKey);
        managedBroker.createNewQueue(queueName, null, true, arguments);

        final ManagedQueue managedQueue = _jmxUtils.getManagedQueue(queueName);

        assertNotNull("Manager queue expected to be available", managedQueue);
        assertEquals("Unexpected message group key", messageGroupKey, managedQueue.getMessageGroupKey());
View Full Code Here

Examples of org.apache.qpid.management.common.mbeans.ManagedBroker

    }

    public void testIsMessageGroupSharedGroups() throws Exception
    {
        final String queueName = getName();
        final ManagedBroker managedBroker = _jmxUtils.getManagedBroker(VIRTUAL_HOST);

        final Object messageGroupKey = "test";
        final Map<String, Object> arguments = new HashMap<String, Object>(2);
        arguments.put(QueueArgumentsConverter.QPID_GROUP_HEADER_KEY, messageGroupKey);
        arguments.put(QueueArgumentsConverter.QPID_SHARED_MSG_GROUP, SimpleAMQQueue.SHARED_MSG_GROUP_ARG_VALUE);
        managedBroker.createNewQueue(queueName, null, true, arguments);

        final ManagedQueue managedQueue = _jmxUtils.getManagedQueue(queueName);

        assertNotNull("Manager queue expected to be available", managedQueue);
        assertEquals("Unexpected message group key", messageGroupKey, managedQueue.getMessageGroupKey());
View Full Code Here

Examples of org.apache.qpid.management.common.mbeans.ManagedBroker

     * @throws MBeanException if there is another problem creating the exchange
     */
    public void createExchange(String virtualHostName, String name, String type, boolean durable)
            throws JMException, IOException, MBeanException
    {
        ManagedBroker managedBroker = getManagedBroker(virtualHostName);

        managedBroker.createNewExchange(name, type, durable);
    }
View Full Code Here

Examples of org.apache.qpid.management.common.mbeans.ManagedBroker

     * @throws MBeanException if there is another problem creating the exchange
     */
    public void createQueue(String virtualHostName, String name, String owner, boolean durable)
            throws JMException, MBeanException, IOException
    {
        ManagedBroker managedBroker = getManagedBroker(virtualHostName);

        managedBroker.createNewQueue(name, owner, durable);
    }
View Full Code Here

Examples of org.apache.qpid.management.common.mbeans.ManagedBroker

     * @throws MBeanException if there is another problem creating the exchange
     */
    public void unregisterExchange(String virtualHostName, String exchange)
            throws IOException, JMException, MBeanException
    {
        ManagedBroker managedBroker = getManagedBroker(virtualHostName);
        managedBroker.unregisterExchange(exchange);
    }
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.