Package org.apache.activemq.command

Examples of org.apache.activemq.command.ConnectionControl


     */
    public void startProcessing() {
        started.set(true);
        try {
            Connection[] connections = getClients();
            ConnectionControl command = new ConnectionControl();
            command.setFaultTolerant(true);
            if (connections != null) {
                for (int i = 0; i < connections.length; i++) {
                    if (connections[i].isActive() && connections[i].isManageable()) {
                        connections[i].dispatchAsync(command);
                    }
View Full Code Here


     */
    public void startProcessing(){
        started.set(true);
        try{
            Connection[] connections=getClients();
            ConnectionControl command=new ConnectionControl();
            command.setFaultTolerant(true);
            if(connections!=null){
                for(int i=0;i<connections.length;i++){
                    if(connections[i].isActive()&&connections[i].isManageable()){
                        connections[i].dispatchAsync(command);
                    }
View Full Code Here

        localConnectionStates.put(info.getConnectionId(), state);          
       
        broker.addConnection(context, info);
        if (info.isManageable() && broker.isFaultTolerantConfiguration()){
            //send ConnectionCommand
            ConnectionControl command = new ConnectionControl();
            command.setFaultTolerant(broker.isFaultTolerantConfiguration());
            dispatchAsync(command);
        }

        return null;
    }
View Full Code Here

    }

    protected void restoreTransport(Transport t) throws Exception, IOException {
        t.start();
        //send information to the broker - informing it we are an ft client
        ConnectionControl cc = new ConnectionControl();
        cc.setFaultTolerant(true);
        t.oneway(cc);
        stateTracker.restore(t);
        Map tmpMap = null;
        synchronized(requestMap) {
            tmpMap = new LinkedHashMap<Integer, Command>(requestMap);
View Full Code Here

            LOG.warn("Failed to add Connection", e);
            throw e;
        }
        if (info.isManageable() && broker.isFaultTolerantConfiguration()) {
            // send ConnectionCommand
            ConnectionControl command = new ConnectionControl();
            command.setFaultTolerant(broker.isFaultTolerantConfiguration());
            dispatchAsync(command);
        }
        return null;
    }
View Full Code Here

                long now = System.currentTimeMillis();
                LOG.info("Remainder: " + i + ", rate: " + sampleRate * 1000 / (now - start) + "m/s" );
                start = now;
            }
        }
        connection.syncSendPacket(new ConnectionControl());
        connection.close();
    }
View Full Code Here

public class ConnectionControlTest extends BaseCommandTestSupport {

    public static final ConnectionControlTest SINGLETON = new ConnectionControlTest();

    public Object createObject() throws Exception {
        ConnectionControl info = new ConnectionControl();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        ConnectionControl info = (ConnectionControl)object;
        info.setClose(true);
        info.setExit(false);
        info.setFaultTolerant(true);
        info.setResume(false);
        info.setSuspend(true);

    }
View Full Code Here


    public static final ConnectionControlTest SINGLETON = new ConnectionControlTest();

    public Object createObject() throws Exception {
        ConnectionControl info = new ConnectionControl();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        ConnectionControl info = (ConnectionControl) object;

        info.setClose(true);
        info.setExit(false);
        info.setFaultTolerant(true);
        info.setResume(false);
        info.setSuspend(true);
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.command.ConnectionControl

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.