/** * Creates an ActiveMQBuffer wrapping an underlying NIO ByteBuffer * * The position on this buffer won't affect the position on the inner buffer * * @param underlying the underlying NIO ByteBuffer * @return an ActiveMQBuffer wrapping the underlying NIO ByteBuffer */ public static ActiveMQBuffer wrappedBuffer(final ByteBuffer underlying) { ActiveMQBuffer buff = new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying)); buff.clear(); return buff; }
/** * Utility method to set the Text message on a message body */ public static void writeBodyText(ActiveMQBuffer buff, SimpleString text) { buff.clear(); buff.writeNullableSimpleString(text); }
@Override public void clearBody() throws JMSException { super.clearBody(); getBuffer().clear(); }
@Override public void clearBody() throws JMSException { super.clearBody(); try { getBuffer().clear(); } catch (RuntimeException e) { JMSException e2 = new JMSException(e.getMessage()); e2.initCause(e); throw e2; } }
@Override public void doBeforeSend() throws Exception { message.getBodyBuffer().clear(); if (data != null) { message.getBodyBuffer().writeInt(data.length); message.getBodyBuffer().writeBytes(data); } super.doBeforeSend(); }
/** * Utility method to set the Text message on a message body */ public static void writeBodyText(ActiveMQBuffer buff, SimpleString text) { buff.clear(); buff.writeNullableSimpleString(text); }
/** * Utility method to set the Text message on a message body */ public static void writeBodyText(ActiveMQBuffer buff, SimpleString text) { buff.clear(); buff.writeNullableSimpleString(text); }
/** * Utility method to set the Text message on a message body */ public static void writeBodyText(ActiveMQBuffer buff, SimpleString text) { buff.clear(); buff.writeNullableSimpleString(text); }
/** * Creates an ActiveMQBuffer wrapping an underlying NIO ByteBuffer * * The position on this buffer won't affect the position on the inner buffer * * @param underlying the underlying NIO ByteBuffer * @return an ActiveMQBuffer wrapping the underlying NIO ByteBuffer */ public static ActiveMQBuffer wrappedBuffer(final ByteBuffer underlying) { ActiveMQBuffer buff = new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying)); buff.clear(); return buff; }
/** * Creates an ActiveMQBuffer wrapping an underlying NIO ByteBuffer * * The position on this buffer won't affect the position on the inner buffer * * @param underlying the underlying NIO ByteBuffer * @return an ActiveMQBuffer wrapping the underlying NIO ByteBuffer */ public static ActiveMQBuffer wrappedBuffer(final ByteBuffer underlying) { ActiveMQBuffer buff = new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying)); buff.clear(); return buff; }
/** * Utility method to set the Text message on a message body */ public static void writeBodyText(ActiveMQBuffer buff, SimpleString text) { buff.clear(); buff.writeNullableSimpleString(text); }
@Override public void clearBody() throws JMSException { super.clearBody(); getBuffer().clear(); }
@Override public void clearBody() throws JMSException { super.clearBody(); getWriteBodyBuffer().clear(); }
@Override public void clearBody() throws JMSException { super.clearBody(); getBuffer().clear(); }
@Override public void clearBody() throws JMSException { super.clearBody(); try { getBuffer().clear(); } catch (RuntimeException e) { JMSException e2 = new JMSException(e.getMessage()); e2.initCause(e); throw e2; } }
@Override public void clearBody() throws JMSException { super.clearBody(); try { getBuffer().clear(); } catch (RuntimeException e) { JMSException e2 = new JMSException(e.getMessage()); e2.initCause(e); throw e2; } }
@Override public void clearBody() throws JMSException { super.clearBody(); try { getBuffer().clear(); } catch (RuntimeException e) { JMSException e2 = new JMSException(e.getMessage()); e2.initCause(e); throw e2; } }
@Override public void clearBody() throws JMSException { super.clearBody(); try { getBuffer().clear(); } catch (RuntimeException e) { JMSException e2 = new JMSException(e.getMessage()); e2.initCause(e); throw e2; } }
@Override public void doBeforeSend() throws Exception { message.getBodyBuffer().clear(); if (data != null) { message.getBodyBuffer().writeInt(data.length); message.getBodyBuffer().writeBytes(data); } super.doBeforeSend(); }
@Override public void doBeforeSend() throws Exception { message.getBodyBuffer().clear(); if (data != null) { message.getBodyBuffer().writeInt(data.length); message.getBodyBuffer().writeBytes(data); } super.doBeforeSend(); }