Package org.apache.activemq.command

Examples of org.apache.activemq.command.ConnectionControl


     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

        ConnectionControl info = (ConnectionControl)o;
        info.setClose(bs.readBoolean());
        info.setExit(bs.readBoolean());
        info.setFaultTolerant(bs.readBoolean());
        info.setResume(bs.readBoolean());
        info.setSuspend(bs.readBoolean());

    }
View Full Code Here


    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {

        ConnectionControl info = (ConnectionControl)o;

        int rc = super.tightMarshal1(wireFormat, o, bs);
        bs.writeBoolean(info.isClose());
        bs.writeBoolean(info.isExit());
        bs.writeBoolean(info.isFaultTolerant());
        bs.writeBoolean(info.isResume());
        bs.writeBoolean(info.isSuspend());

        return rc + 0;
    }
View Full Code Here

     * @throws IOException thrown if an error occurs
     */
    public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
        super.tightMarshal2(wireFormat, o, dataOut, bs);

        ConnectionControl info = (ConnectionControl)o;
        bs.readBoolean();
        bs.readBoolean();
        bs.readBoolean();
        bs.readBoolean();
        bs.readBoolean();
View Full Code Here

     * @throws IOException
     */
    public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
        super.looseUnmarshal(wireFormat, o, dataIn);

        ConnectionControl info = (ConnectionControl)o;
        info.setClose(dataIn.readBoolean());
        info.setExit(dataIn.readBoolean());
        info.setFaultTolerant(dataIn.readBoolean());
        info.setResume(dataIn.readBoolean());
        info.setSuspend(dataIn.readBoolean());

    }
View Full Code Here

    /**
     * Write the booleans that this object uses to a BooleanStream
     */
    public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {

        ConnectionControl info = (ConnectionControl)o;

        super.looseMarshal(wireFormat, o, dataOut);
        dataOut.writeBoolean(info.isClose());
        dataOut.writeBoolean(info.isExit());
        dataOut.writeBoolean(info.isFaultTolerant());
        dataOut.writeBoolean(info.isResume());
        dataOut.writeBoolean(info.isSuspend());

    }
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

    }

    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

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

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.