Package org.apache.activemq.wireformat

Examples of org.apache.activemq.wireformat.WireFormat


                options.put("logWriterName", logWriterName);
                options.put("dynamicManagement", Boolean.valueOf(dynamicManagement));
                options.put("startLogging", Boolean.valueOf(startLogging));
                options.putAll(transportOptions);

                WireFormat format = wireFormatFactory.createWireFormat();
                Transport transport = createTransport(socket, format);
                closeSocket = false;

                if (transport instanceof ServiceSupport) {
                    ((ServiceSupport) transport).addServiceListener(this);
View Full Code Here


                options.put("logWriterName", logWriterName);
                options.put("dynamicManagement", Boolean.valueOf(dynamicManagement));
                options.put("startLogging", Boolean.valueOf(startLogging));
                options.putAll(transportOptions);

                WireFormat format = wireFormatFactory.createWireFormat();
                Transport transport = createTransport(socket, format);
                closeSocket = false;

                if (transport instanceof ServiceSupport) {
                    ((ServiceSupport) transport).addServiceListener(this);
View Full Code Here

    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.error("id: " + id + ", message SeqId: " + message.getMessageId().getBrokerSequenceId() + ", MSG: " + message);
        }
        statement.close();
        conn.close();
    }
View Full Code Here

        broker.stop();
    }

     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();
        LOG.info("Messages left in broker after test");
        while(result.next()) {
            long id = result.getLong(1);
            org.apache.activemq.command.Message message = (org.apache.activemq.command.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

                options.put("logWriterName", logWriterName);
                options.put("dynamicManagement", Boolean.valueOf(dynamicManagement));
                options.put("startLogging", Boolean.valueOf(startLogging));
                options.putAll(transportOptions);

                WireFormat format = wireFormatFactory.createWireFormat();
                Transport transport = createTransport(socket, format);

                if (transport instanceof ServiceSupport) {
                    ((ServiceSupport) transport).addServiceListener(this);
                }
View Full Code Here

        broker.stop();
    }

     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();
        LOG.info("Messages left in broker after test");
        while(result.next()) {
            long id = result.getLong(1);
            org.apache.activemq.command.Message message = (org.apache.activemq.command.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

    }

    public Transport doConnect(URI location) throws Exception {
        try {
            Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));
            WireFormat wf = createWireFormat(options);
            Transport transport = createTransport(location, wf);
            Transport rc = configure(transport, wf, options);
            if (!options.isEmpty()) {
                throw new IllegalArgumentException("Invalid connect parameters: " + options);
            }
View Full Code Here

    }

    public Transport doCompositeConnect(URI location) throws Exception {
        try {
            Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));
            WireFormat wf = createWireFormat(options);
            Transport transport = createTransport(location, wf);
            Transport rc = compositeConfigure(transport, wf, options);
            if (!options.isEmpty()) {
                throw new IllegalArgumentException("Invalid connect parameters: " + options);
            }
View Full Code Here

        return tf;
    }

    protected WireFormat createWireFormat(Map<String, String> options) throws IOException {
        WireFormatFactory factory = createWireFormatFactory(options);
        WireFormat format = factory.createWireFormat();
        return format;
    }
View Full Code Here

                options.put("logWriterName", logWriterName);
                options.put("dynamicManagement", Boolean.valueOf(dynamicManagement));
                options.put("startLogging", Boolean.valueOf(startLogging));
                options.putAll(transportOptions);

                WireFormat format = wireFormatFactory.createWireFormat();
                Transport transport = createTransport(socket, format);
                closeSocket = false;

                if (transport instanceof ServiceSupport) {
                    ((ServiceSupport) transport).addServiceListener(this);
View Full Code Here

TOP

Related Classes of org.apache.activemq.wireformat.WireFormat

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.