Examples of OpenWireFormat


Examples of org.apache.activemq.openwire.OpenWireFormat

       
        // we are not using the TransportFactory as this assumes that
        // UDP transports talk to a server using a WireFormat Negotiation step
        // rather than talking directly to each other
       
        OpenWireFormat wireFormat = createWireFormat();
        UdpTransport transport = new UdpTransport(wireFormat, new URI(producerURI));
        transport.setSequenceGenerator(new IntSequenceGenerator());
        return new CommandJoiner(transport, wireFormat);
    }
View Full Code Here

Examples of org.apache.activemq.openwire.OpenWireFormat

        return new CommandJoiner(transport, wireFormat);
    }

    protected Transport createConsumer() throws Exception {
        log.info("Consumer on port: " + consumerPort);
        OpenWireFormat wireFormat = createWireFormat();
        UdpTransport transport = new UdpTransport(wireFormat, consumerPort);
        transport.setSequenceGenerator(new IntSequenceGenerator());
        return new CommandJoiner(transport, wireFormat);
    }
View Full Code Here

Examples of org.apache.activemq.openwire.OpenWireFormat

        transport.setSequenceGenerator(new IntSequenceGenerator());
        return new CommandJoiner(transport, wireFormat);
    }

    protected OpenWireFormat createWireFormat() {
        return new OpenWireFormat();
    }
View Full Code Here

Examples of org.apache.activemq.openwire.OpenWireFormat

    };

    protected Transport createProducer() throws Exception {
        log.info("Producer using URI: " + producerURI);

        OpenWireFormat wireFormat = createWireFormat();
        UnreliableUdpTransport transport = new UnreliableUdpTransport(wireFormat, new URI(producerURI));
        transport.setDropCommandStrategy(dropStrategy);

        ReliableTransport reliableTransport = new ReliableTransport(transport, transport);
        Replayer replayer = reliableTransport.getReplayer();
View Full Code Here

Examples of org.apache.activemq.openwire.OpenWireFormat

        return new CommandJoiner(reliableTransport, wireFormat);
    }

    protected Transport createConsumer() throws Exception {
        log.info("Consumer on port: " + consumerPort);
        OpenWireFormat wireFormat = createWireFormat();
        UdpTransport transport = new UdpTransport(wireFormat, consumerPort);

        ReliableTransport reliableTransport = new ReliableTransport(transport, transport);
        Replayer replayer = reliableTransport.getReplayer();
        reliableTransport.setReplayStrategy(createReplayStrategy(replayer));
View Full Code Here

Examples of org.apache.activemq.openwire.OpenWireFormat

     * @throws IOException
     */
    public FilePendingMessageCursor(String name,Store store){
        try{
            list=store.getListContainer(name);
            list.setMarshaller(new CommandMarshaller(new OpenWireFormat()));
            list.setMaximumCacheSize(0);
        }catch(IOException e){
            throw new RuntimeException(e);
        }
    }
View Full Code Here

Examples of org.apache.activemq.openwire.OpenWireFormat

        wireFormat = createWireFormat();
        super.setUp();
    }
   
    protected WireFormat createWireFormat() {
        OpenWireFormat answer = new OpenWireFormat();
        answer.setCacheEnabled(cacheEnabled);
        return answer;
    }
View Full Code Here

Examples of org.apache.activemq.openwire.OpenWireFormat

        msg.setProperty("floatProperty", Float.valueOf("1.1f"));
        msg.setProperty("doubleProperty", Double.valueOf("1.1"));
        msg.setProperty("booleanProperty", Boolean.TRUE);
        msg.setProperty("nullProperty", null);

        msg.beforeMarshall(new OpenWireFormat());

        Map properties = msg.getProperties();
        assertEquals(properties.get("stringProperty"),"string");
        assertEquals(((Byte)properties.get("byteProperty")).byteValue(),1);
        assertEquals(((Short)properties.get("shortProperty")).shortValue(),1);
View Full Code Here

Examples of org.apache.activemq.openwire.OpenWireFormat

    public WireFormat wireFormat = new OpenWireFormat();
   
    public void initCombos() {
     
      OpenWireFormat wf1 = new OpenWireFormat();
      wf1.setCacheEnabled(false);
      OpenWireFormat wf2 = new OpenWireFormat();
      wf2.setCacheEnabled(true);
     
        addCombinationValues( "wireFormat", new Object[]{
                wf1,
                wf2,
                });       
View Full Code Here

Examples of org.apache.activemq.openwire.OpenWireFormat

    private static final Log LOG = LogFactory.getLog(JDBCStoreOrderTest.class);
   
    @Override
     protected void dumpMessages() throws Exception {
        WireFormat wireFormat = new OpenWireFormat();
        java.sql.Connection conn = ((JDBCPersistenceAdapter) broker.getPersistenceAdapter()).getDataSource().getConnection();
        PreparedStatement statement = conn.prepareStatement("SELECT ID, MSG FROM ACTIVEMQ_MSGS");   
        ResultSet result = statement.executeQuery();
        while(result.next()) {
            long id = result.getLong(1);
            Message message = (Message)wireFormat.unmarshal(new ByteSequence(result.getBytes(2)));
            LOG.info("id: " + id + ", message SeqId: " + message.getMessageId().getBrokerSequenceId() + ", MSG: " + message);
        }
        statement.close();
        conn.close();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.