Package org.apache.activemq.command

Examples of org.apache.activemq.command.WireFormatInfo


public class WireFormatInfoTest extends DataFileGeneratorTestSupport {

    public static final WireFormatInfoTest SINGLETON = new WireFormatInfoTest();

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


        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        WireFormatInfo info = (WireFormatInfo)object;
        info.setVersion(1);

        {
            byte data[] = "MarshalledProperties:1".getBytes();
            info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length));
        }

    }
View Full Code Here

public class WireFormatInfoTest extends DataFileGeneratorTestSupport {

    public static final WireFormatInfoTest SINGLETON = new WireFormatInfoTest();

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

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        WireFormatInfo info = (WireFormatInfo)object;
        info.setVersion(1);

        {
            byte data[] = "MarshalledProperties:1".getBytes();
            info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length));
        }

    }
View Full Code Here

    private long maxInactivityDurationInitalDelay = 10*1000;
    private int cacheSize = 1024;
    private long maxFrameSize = OpenWireFormat.DEFAULT_MAX_FRAME_SIZE;

    public WireFormat createWireFormat() {
        WireFormatInfo info = new WireFormatInfo();
        info.setVersion(version);

        try {
            info.setStackTraceEnabled(stackTraceEnabled);
            info.setCacheEnabled(cacheEnabled);
            info.setTcpNoDelayEnabled(tcpNoDelayEnabled);
            info.setTightEncodingEnabled(tightEncodingEnabled);
            info.setSizePrefixDisabled(sizePrefixDisabled);
            info.setMaxInactivityDuration(maxInactivityDuration);
            info.setMaxInactivityDurationInitalDelay(maxInactivityDurationInitalDelay);
            info.setCacheSize(cacheSize);
            info.setMaxFrameSize(maxFrameSize);
        } catch (Exception e) {
            IllegalStateException ise = new IllegalStateException("Could not configure WireFormatInfo");
            ise.initCause(e);
            throw ise;
        }
View Full Code Here

            public void transportResumed() {
            }
        });
        clientTransport.start();
        WireFormatInfo info = new WireFormatInfo();
        info.setVersion(OpenWireFormat.DEFAULT_VERSION);
        info.setMaxInactivityDuration(1000);
        clientTransport.oneway(info);

        assertEquals(0, serverErrorCount.get());
        assertEquals(0, clientErrorCount.get());
View Full Code Here

            public void transportResumed() {
            }
        });
        clientTransport.start();
        WireFormatInfo info = new WireFormatInfo();
        info.seMaxInactivityDuration(1000);
        clientTransport.oneway(info);

        assertEquals(0, serverErrorCount.get());
        assertEquals(0, clientErrorCount.get());
View Full Code Here

        // Read the command directly from the reader
        Command command = (Command)wireFormat.unmarshalText(request.getReader());

        if (command instanceof WireFormatInfo) {
            WireFormatInfo info = (WireFormatInfo)command;
            if (!canProcessWireFormatVersion(info.getVersion())) {
                response.sendError(HttpServletResponse.SC_NOT_FOUND, "Cannot process wire format of version: " + info.getVersion());
            }

        } else {

            BlockingQueueTransport transport = getTransportChannel(request, response);
View Full Code Here

            public void transportResumed() {
            }
        });
        clientTransport.start();
        WireFormatInfo info = new WireFormatInfo();
        info.setMaxInactivityDuration(1000);
        clientTransport.oneway(info);

        assertEquals(0, serverErrorCount.get());
        assertEquals(0, clientErrorCount.get());
View Full Code Here

    private long maxInactivityDuration = 30*1000;
    private long maxInactivityDurationInitalDelay = 10*1000;
    private int cacheSize = 1024;

    public WireFormat createWireFormat() {
        WireFormatInfo info = new WireFormatInfo();
        info.setVersion(version);

        try {
            info.setStackTraceEnabled(stackTraceEnabled);
            info.setCacheEnabled(cacheEnabled);
            info.setTcpNoDelayEnabled(tcpNoDelayEnabled);
            info.setTightEncodingEnabled(tightEncodingEnabled);
            info.setSizePrefixDisabled(sizePrefixDisabled);
            info.setMaxInactivityDuration(maxInactivityDuration);
            info.setMaxInactivityDurationInitalDelay(maxInactivityDurationInitalDelay);
            info.setCacheSize(cacheSize);
        } catch (Exception e) {
            IllegalStateException ise = new IllegalStateException("Could not configure WireFormatInfo");
            ise.initCause(e);
            throw ise;
        }
View Full Code Here

TOP

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

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.