Package org.apache.activemq.command

Examples of org.apache.activemq.command.PartialCommand


    public void onCommand(Object o) {
      Command command = (Command) o;
        byte type = command.getDataStructureType();
        if (type == PartialCommand.DATA_STRUCTURE_TYPE || type == LastPartialCommand.DATA_STRUCTURE_TYPE) {
            PartialCommand header = (PartialCommand) command;
            byte[] partialData = header.getData();
            try {
                out.write(partialData);
            }
            catch (IOException e) {
                getTransportListener().onException(e);
View Full Code Here


public class PartialCommandTest extends DataFileGeneratorTestSupport {

    public static final PartialCommandTest SINGLETON = new PartialCommandTest();

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

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        PartialCommand info = (PartialCommand)object;
        info.setCommandId(1);
        info.setData("Data:1".getBytes());

    }
View Full Code Here


    public static final PartialCommandTest SINGLETON = new PartialCommandTest();

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

        return info;
    }

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

        info.setCommandId(1);
        info.setData("Data:1".getBytes());
    }
View Full Code Here


    public static final PartialCommandTest SINGLETON = new PartialCommandTest();

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

        return info;
    }

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

        info.setCommandId(1);
        info.setData("Data:1".getBytes());
    }
View Full Code Here

   
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new PartialCommand();
    }
View Full Code Here

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

        PartialCommand info = (PartialCommand)o;
        info.setCommandId(dataIn.readInt());
        info.setData(tightUnmarshalByteArray(dataIn, bs));

    }
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 {

        PartialCommand info = (PartialCommand)o;

        int rc = super.tightMarshal1(wireFormat, o, bs);
        rc += tightMarshalByteArray1(info.getData(), bs);

        return rc + 4;
    }
View Full Code Here

TOP

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

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.