Package org.codehaus.activemq.io.impl

Examples of org.codehaus.activemq.io.impl.DefaultWireFormat


        return new BDbPersistenceAdapter(directory);
    }


    public BDbPersistenceAdapter() {
        this(null, new DefaultWireFormat());
    }
View Full Code Here


        context.deregisterConnector(connector.getServerChannel().getUrl());
    }


    public void addConnector(String bindAddress) throws JMSException {
        addConnector(bindAddress, new DefaultWireFormat());
    }
View Full Code Here

   
    /**
     * Default Constructor
     */
    public WireFormatLoader(){
        this(new DefaultWireFormat());
    }
View Full Code Here

                chars[i] = '_';
            }
        }
        this.name = new String(chars);
        this.maxDataLength = maxDataLength;
        this.wireFormat = new DefaultWireFormat();
        this.container = new DataContainer(dir, this.name, maxBlockSize);
        //as the DataContainer is temporary, clean-up any old files
        this.container.deleteAll();
    }
View Full Code Here

    protected PacketWriter writer;
    protected PacketReader reader;
    protected int packetCount = 10;

    public void testWireFormat() throws IOException, JMSException {
        WireFormat wireFormat = new DefaultWireFormat();

        Packet packet = createPacket();
        System.out.println("Created packet: " + packet + " with type: " + packet.getPacketType());

        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
        DataOutputStream dataOut = new DataOutputStream(buffer);
        wireFormat.writePacket(packet, dataOut);
        dataOut.close();
        byte[] bytes = buffer.toByteArray();

        DataInputStream dataIn = new DataInputStream(new ByteArrayInputStream(bytes));
        int type = dataIn.readByte();
        System.out.println("Read type: " + type);
        Packet otherPacket = wireFormat.readPacket(type, dataIn);

        System.out.println("Read packet: " + otherPacket);
        assertPacket(otherPacket, packet);
    }
View Full Code Here

    forced = false;
  }
 
  public void testKeepAliveProperty() throws Exception {
    long keepAliveTimeout = 373727;
    ReliableTransportChannel ch = (ReliableTransportChannel) new ReliableTransportChannelFactory().create(new DefaultWireFormat(), new URI("vm://localhost:6144?keepAliveTimeout=" + keepAliveTimeout));
    assertEquals(ch.getKeepAliveTimeout(), keepAliveTimeout);
  }
View Full Code Here

  protected class ReliableTransportChannelMock extends ReliableTransportChannel {
    private boolean stopped = false;
    protected long lastReceiptTime = 0;

    protected ReliableTransportChannelMock() {
      super(new DefaultWireFormat());
    }
View Full Code Here

        assertTrue("has receive channel", vmChannel.getReceiveChannel() == null);
        vmChannel.stop();
    }

    protected TransportChannel createChannel(String uri) throws JMSException, URISyntaxException {
        return TransportChannelProvider.create(new DefaultWireFormat(), new URI(uri));
    }
View Full Code Here

     */
   
    protected void initialize() throws JMSException {
        super.initialize();
        try {
            boondocksChannel = TransportChannelProvider.create(new DefaultWireFormat(), new URI(uri));
            boondocksChannel.addTransportStatusEventListener(this);
            if (boondocksChannel instanceof CompositeTransportChannel) {
                CompositeTransportChannel composite = (CompositeTransportChannel)boondocksChannel;
                composite.setMaximumRetries(maximumRetries);
                composite.setFailureSleepTime(reconnectSleepTime);
            }
            boondocksChannel.start();
            //create our own broker connector ...
            BrokerConnectorImpl connector = new BrokerConnectorImpl(getBrokerContainer(),"vm://uri",new DefaultWireFormat());
            connector.start();
            connector.addClient(boondocksChannel);
            sendBrokerInfo();
        }
        catch (URISyntaxException e) {
View Full Code Here

     * @throws JMSException
     */
    public void start() throws JMSException {
        if (started.commit(false, true)) {
            this.timeoutExpiration = this.keepAliveTimeout * timeoutCount;
            channel = new MulticastTransportChannel(new DefaultWireFormat(), uri);
            channel.setClientID(localId);
            channel.setPacketListener(this);
            try {
                channel.setTimeToLive(getTimeToLive());
            }
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.io.impl.DefaultWireFormat

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.