Examples of listConnectionsAsJSON()


Examples of org.hornetq.api.jms.management.JMSServerControl.listConnectionsAsJSON()

        final String operationName = operation.require(OP).asString();
        final JMSServerControl serverControl = getServerControl(context, operation);

        try {
            if (LIST_CONNECTIONS_AS_JSON.equals(operationName)) {
                String json = serverControl.listConnectionsAsJSON();
                context.getResult().set(json);
            } else if (LIST_CONSUMERS_AS_JSON.equals(operationName)) {
                connectionIdValidator.validate(operation);
                String connectionID = operation.require(CONNECTION_ID).asString();
                String json = serverControl.listConsumersAsJSON(connectionID);
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSServerControl.listConnectionsAsJSON()

            return;
        }

        try {
            if (LIST_CONNECTIONS_AS_JSON.equals(operationName)) {
                String json = serverControl.listConnectionsAsJSON();
                context.getResult().set(json);
            } else if (LIST_CONSUMERS_AS_JSON.equals(operationName)) {
                connectionIdValidator.validate(operation);
                String connectionID = operation.require(CONNECTION_ID).asString();
                String json = serverControl.listConsumersAsJSON(connectionID);
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSServerControl.listConnectionsAsJSON()

            throw ControllerLogger.ROOT_LOGGER.managementResourceNotFound(address);
        }

        try {
            if (LIST_CONNECTIONS_AS_JSON.equals(operationName)) {
                String json = serverControl.listConnectionsAsJSON();
                context.getResult().set(json);
            } else if (LIST_CONSUMERS_AS_JSON.equals(operationName)) {
                String connectionID = CONNECTION_ID.resolveModelAttribute(context, operation).asString();
                String json = serverControl.listConsumersAsJSON(connectionID);
                context.getResult().set(json);
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSServerControl.listConnectionsAsJSON()

         JMSServerControl control = createManagementControl();

         long startTime = System.currentTimeMillis();
        
         String jsonStr = control.listConnectionsAsJSON();
         assertNotNull(jsonStr);
         JMSConnectionInfo[] infos = JMSConnectionInfo.from(jsonStr);
         assertEquals(0, infos.length);

         ConnectionFactory cf1 = JMSUtil.createFactory(NettyConnectorFactory.class.getName(),
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSServerControl.listConnectionsAsJSON()

         TemporaryTopic temporaryTopic = session.createTemporaryTopic();

         // create a regular message consumer
         MessageConsumer consumer = session.createConsumer(queue);

         jsonStr = control.listConnectionsAsJSON();
         assertNotNull(jsonStr);
         infos = JMSConnectionInfo.from(jsonStr);
         assertEquals(1, infos.length);
         String connectionID = infos[0].getConnectionID();
        
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSServerControl.listConnectionsAsJSON()

        
         JMSServerControl control = createManagementControl();

         long startTime = System.currentTimeMillis();
        
         String jsonStr = control.listConnectionsAsJSON();
         assertNotNull(jsonStr);
         JMSConnectionInfo[] infos = JMSConnectionInfo.from(jsonStr);
         assertEquals(0, infos.length);

         ConnectionFactory cf1 = JMSUtil.createFactory(NettyConnectorFactory.class.getName(),
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSServerControl.listConnectionsAsJSON()

         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

         // create a durable subscriber
         MessageConsumer consumer = session.createDurableSubscriber(topic, subName);
        
         jsonStr = control.listConnectionsAsJSON();
         assertNotNull(jsonStr);
         infos = JMSConnectionInfo.from(jsonStr);
         assertEquals(1, infos.length);
         String connectionID = infos[0].getConnectionID();
        
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSServerControl.listConnectionsAsJSON()

         assertEquals(msgSent.getJMSMessageID(), receivedMsg.getJMSMessageID());
        
         HornetQMessage jmsMessage = (HornetQMessage)receivedMsg;
         String lastMsgID = jmsMessage.getCoreMessage().getUserID().toString();
        
         String jsonStr = control.listConnectionsAsJSON();
         JMSConnectionInfo[] infos = JMSConnectionInfo.from(jsonStr);
        
         JMSConnectionInfo connInfo = infos[0];
        
         String sessionsStr = control.listSessionsAsJSON(connInfo.getConnectionID());
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSServerControl.listConnectionsAsJSON()

         HornetQActivation activation = new HornetQActivation(ra, new MessageEndpointFactory(), spec);

         activation.start();

         String cons = control.listConnectionsAsJSON();

         JMSConnectionInfo[] jmsConnectionInfos = JMSConnectionInfo.from(cons);

         assertEquals(1, jmsConnectionInfos.length);
View Full Code Here

Examples of org.hornetq.api.jms.management.JMSServerControl.listConnectionsAsJSON()

         HornetQActivation activation = new HornetQActivation(ra, new MessageEndpointFactory(), spec);

         activation.start();

         String cons = control.listConnectionsAsJSON();

         JMSConnectionInfo[] jmsConnectionInfos = JMSConnectionInfo.from(cons);

         assertEquals(1, jmsConnectionInfos.length);
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.