Package org.apache.activemq.apollo.openwire.support

Examples of org.apache.activemq.apollo.openwire.support.OpenwireException


    public void writeDouble(double value) throws OpenwireException {
        initializeWriting();
        try {
            this.dataOut.writeDouble(value);
        } catch (IOException ioe) {
            throw new OpenwireException(ioe);
        }
    }
View Full Code Here


    public void writeUTF(String value) throws OpenwireException {
        initializeWriting();
        try {
            this.dataOut.writeUTF(value);
        } catch (IOException ioe) {
            throw new OpenwireException(ioe);
        }
    }
View Full Code Here

    public void writeBytes(byte[] value) throws OpenwireException {
        initializeWriting();
        try {
            this.dataOut.write(value);
        } catch (IOException ioe) {
            throw new OpenwireException(ioe);
        }
    }
View Full Code Here

    public void writeBytes(byte[] value, int offset, int length) throws OpenwireException {
        initializeWriting();
        try {
            this.dataOut.write(value, offset, length);
        } catch (IOException ioe) {
            throw new OpenwireException(ioe);
        }
    }
View Full Code Here

        } else if (value instanceof String) {
            writeUTF(value.toString());
        } else if (value instanceof byte[]) {
            writeBytes((byte[])value);
        } else {
            throw new OpenwireException("Cannot write non-primitive type:" + value.getClass());
        }
    }
View Full Code Here

                // keep track of the real length of the content if
                // we are compressed.
                try {
                    os.write(new byte[4]);
                } catch (IOException e) {
                    throw new OpenwireException(e);
                }
                length = 0;
                compressed = true;
                final Deflater deflater = new Deflater(Deflater.BEST_SPEED);
                os = new FilterOutputStream(new DeflaterOutputStream(os, deflater)) {
View Full Code Here

        }
    }

    protected void checkWriteOnlyBody() throws OpenwireException {
        if (!readOnlyBody) {
            throw new OpenwireException("Message body is write-only");
        }
    }
View Full Code Here

                try {
                    DataInputStream dis = new DataInputStream(is);
                    length = dis.readInt();
                    dis.close();
                } catch (IOException e) {
                    throw new OpenwireException(e);
                }
                is = new InflaterInputStream(is);
            } else {
                length = data.getLength();
            }
View Full Code Here

            try {
                acknowledgeCallback.execute();
            } catch (OpenwireException e) {
                throw e;
            } catch (Throwable e) {
                throw new OpenwireException(e);
            }
        }
    }
View Full Code Here

        MessageId id = null;
        try {
            id = new MessageId(producerId, producerSequenceId);
            this.setMessageId(id);
        } catch (Throwable e) {
            throw new OpenwireException("Invalid message id '" + id + "', reason: " + e.getMessage(), e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.apollo.openwire.support.OpenwireException

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.