Package org.hornetq.api.core.management

Examples of org.hornetq.api.core.management.HornetQServerControl.closeConnectionsForAddress()


                ModelNode addr = operation.get(IP_ADDRESS);
                String[] list = addr.isDefined() ? serverControl.listRemoteAddresses(addr.asString()) : serverControl.listRemoteAddresses();
                reportListOfString(context, list);
            } else if (CLOSE_CONNECTIONS_FOR_ADDRESS.equals(operationName)) {
                ipAddressValidator.validate(operation);
                boolean closed = serverControl.closeConnectionsForAddress(operation.require(IP_ADDRESS).asString());
                context.getResult().set(closed);
            } else if (LIST_CONNECTION_IDS.equals(operationName)) {
                String[] list = serverControl.listConnectionIDs();
                reportListOfString(context, list);
            } else if (LIST_PRODUCERS_INFO_AS_JSON.equals(operationName)) {
View Full Code Here


                ModelNode addr = operation.get(IP_ADDRESS);
                String[] list = addr.isDefined() ? serverControl.listRemoteAddresses(addr.asString()) : serverControl.listRemoteAddresses();
                reportListOfString(context, list);
            } else if (CLOSE_CONNECTIONS_FOR_ADDRESS.equals(operationName)) {
                ipAddressValidator.validate(operation);
                boolean closed = serverControl.closeConnectionsForAddress(operation.require(IP_ADDRESS).asString());
                context.getResult().set(closed);
            } else if (LIST_CONNECTION_IDS.equals(operationName)) {
                String[] list = serverControl.listConnectionIDs();
                reportListOfString(context, list);
            } else if (LIST_PRODUCERS_INFO_AS_JSON.equals(operationName)) {
View Full Code Here

                ModelNode address = OPTIONAL_IP_ADDRESS.resolveModelAttribute(context, operation);
                String[] list = address.isDefined() ? serverControl.listRemoteAddresses(address.asString()) : serverControl.listRemoteAddresses();
                reportListOfStrings(context, list);
            } else if (CLOSE_CONNECTIONS_FOR_ADDRESS.equals(operationName)) {
                String address = REQUIRED_IP_ADDRESS.resolveModelAttribute(context, operation).asString();
                boolean closed = serverControl.closeConnectionsForAddress(address);
                context.getResult().set(closed);
            } else if (CLOSE_CONNECTIONS_FOR_USER.equals(operationName)) {
                String user = USER.resolveModelAttribute(context, operation).asString();
                boolean closed = serverControl.closeConnectionsForUser(user);
                context.getResult().set(closed);
View Full Code Here

                ModelNode addr = operation.get(IP_ADDRESS);
                String[] list = addr.isDefined() ? serverControl.listRemoteAddresses(addr.asString()) : serverControl.listRemoteAddresses();
                reportListOfString(context, list);
            } else if (CLOSE_CONNECTIONS_FOR_ADDRESS.equals(operationName)) {
                ipAddressValidator.validate(operation);
                boolean closed = serverControl.closeConnectionsForAddress(operation.require(IP_ADDRESS).asString());
                context.getResult().set(closed);
            } else if (LIST_CONNECTION_IDS.equals(operationName)) {
                String[] list = serverControl.listConnectionIDs();
                reportListOfString(context, list);
            } else if (LIST_PRODUCERS_INFO_AS_JSON.equals(operationName)) {
View Full Code Here

                ModelNode addr = operation.get(IP_ADDRESS);
                String[] list = addr.isDefined() ? serverControl.listRemoteAddresses(addr.asString()) : serverControl.listRemoteAddresses();
                reportListOfString(context, list);
            } else if (CLOSE_CONNECTIONS_FOR_ADDRESS.equals(operationName)) {
                ipAddressValidator.validate(operation);
                boolean closed = serverControl.closeConnectionsForAddress(operation.require(IP_ADDRESS).asString());
                context.getResult().set(closed);
            } else if (LIST_CONNECTION_IDS.equals(operationName)) {
                String[] list = serverControl.listConnectionIDs();
                reportListOfString(context, list);
            } else if (LIST_PRODUCERS_INFO_AS_JSON.equals(operationName)) {
View Full Code Here

            System.out.println(remoteAddress);
         }
         System.out.println("----------------------------------");

         // Step 8. Close the connections for the 1st remote address and kickoff the client
         serverControl.closeConnectionsForAddress(remoteAddresses[0]);

         // Sleep a little bit so that the stack trace from the server won't be
         // mingled with the JMSException received on the ExceptionListener
         Thread.sleep(1000);
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.