public String marshalToString(StompFrame stomp) throws IOException { if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { return String.valueOf((char)Stomp.BREAK); } StringBuilder buffer = new StringBuilder(); marshalHeaders(stomp, buffer); if (stomp.getContent() != null) { String contentString = new String(stomp.getContent(), "UTF-8"); buffer.append(contentString); } buffer.append('\u0000'); return buffer.toString(); }
public String marshalToString(StompFrame stomp) throws IOException { if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { return String.valueOf((char)Stomp.BREAK); } StringBuilder buffer = new StringBuilder(); marshalHeaders(stomp, buffer); if (stomp.getContent() != null) { String contentString = new String(stomp.getContent(), "UTF-8"); buffer.append(contentString); } buffer.append('\u0000'); return buffer.toString(); }
@Override public void marshal(Object command, DataOutput os) throws IOException { StompFrame stomp = (org.apache.activemq.transport.stomp.StompFrame)command; if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { os.write(Stomp.BREAK); return; } StringBuilder builder = new StringBuilder(); os.write(marshalHeaders(stomp, builder).toString().getBytes("UTF-8")); os.write(stomp.getContent()); os.write(END_OF_FRAME); }
public String marshalToString(StompFrame stomp) throws IOException { if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { return String.valueOf((char)Stomp.BREAK); } StringBuilder buffer = new StringBuilder(); marshalHeaders(stomp, buffer); if (stomp.getContent() != null) { String contentString = new String(stomp.getContent(), "UTF-8"); buffer.append(contentString); } buffer.append('\u0000'); return buffer.toString(); }
@Override public void marshal(Object command, DataOutput os) throws IOException { StompFrame stomp = (org.apache.activemq.transport.stomp.StompFrame)command; if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { os.write(Stomp.BREAK); return; } StringBuilder builder = new StringBuilder(); os.write(marshalHeaders(stomp, builder).toString().getBytes("UTF-8")); os.write(stomp.getContent()); os.write(END_OF_FRAME); }
@Override public void marshal(Object command, DataOutput os) throws IOException { StompFrame stomp = (org.apache.activemq.transport.stomp.StompFrame)command; if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { os.write(Stomp.BREAK); return; } StringBuilder builder = new StringBuilder(); os.write(marshalHeaders(stomp, builder).toString().getBytes("UTF-8")); os.write(stomp.getContent()); os.write(END_OF_FRAME); }
public void marshal(Object command, DataOutput os) throws IOException { StompFrame stomp = (org.apache.activemq.transport.stomp.StompFrame)command; StringBuffer buffer = new StringBuffer(); buffer.append(stomp.getAction()); buffer.append(Stomp.NEWLINE); // Output the headers. for (Iterator iter = stomp.getHeaders().entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry)iter.next(); buffer.append(entry.getKey()); buffer.append(Stomp.Headers.SEPERATOR); buffer.append(entry.getValue()); buffer.append(Stomp.NEWLINE); } // Add a newline to seperate the headers from the content. buffer.append(Stomp.NEWLINE); os.write(buffer.toString().getBytes("UTF-8")); os.write(stomp.getContent()); os.write(END_OF_FRAME); }
if (getContent() != null) { try { String contentString = new String(getContent(), "UTF-8"); if (forLogging) { contentString = MarshallingSupport.truncate64(contentString); buffer.append(Arrays.toString(getContent()));
public void marshal(Object command, DataOutput os) throws IOException { StompFrame stomp = (org.apache.activemq.transport.stomp.StompFrame) command; if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { os.write(Stomp.BREAK); return; } StringBuilder buffer = new StringBuilder(); buffer.append(stomp.getAction()); buffer.append(Stomp.NEWLINE); // Output the headers. for (Map.Entry<String, String> entry : stomp.getHeaders().entrySet()) { buffer.append(entry.getKey()); buffer.append(Stomp.Headers.SEPERATOR); buffer.append(encodeHeader(entry.getValue())); buffer.append(Stomp.NEWLINE); } // Add a newline to seperate the headers from the content. buffer.append(Stomp.NEWLINE); os.write(buffer.toString().getBytes("UTF-8")); os.write(stomp.getContent()); os.write(END_OF_FRAME); }
if (getContent() != null) { try { String contentString = new String(getContent(), "UTF-8"); if (forLogging) { contentString = MarshallingSupport.truncate64(contentString); buffer.append(Arrays.toString(getContent()));
public void marshal(Object command, DataOutput os) throws IOException { StompFrame stomp = (org.apache.activemq.transport.stomp.StompFrame) command; if (stomp.getAction().equals(Stomp.Commands.KEEPALIVE)) { os.write(Stomp.BREAK); return; } StringBuilder buffer = new StringBuilder(); buffer.append(stomp.getAction()); buffer.append(Stomp.NEWLINE); // Output the headers. for (Map.Entry<String, String> entry : stomp.getHeaders().entrySet()) { buffer.append(entry.getKey()); buffer.append(Stomp.Headers.SEPERATOR); buffer.append(encodeHeader(entry.getValue())); buffer.append(Stomp.NEWLINE); } // Add a newline to seperate the headers from the content. buffer.append(Stomp.NEWLINE); os.write(buffer.toString().getBytes("UTF-8")); os.write(stomp.getContent()); os.write(END_OF_FRAME); }
if (getContent() != null) { try { String contentString = new String(getContent(), "UTF-8"); if (forLogging) { contentString = MarshallingSupport.truncate64(contentString); buffer.append(Arrays.toString(getContent()));
if (getContent() != null) { try { String contentString = new String(getContent(), "UTF-8"); if (forLogging) { contentString = MarshallingSupport.truncate64(contentString); buffer.append(Arrays.toString(getContent()));
ActiveMQTextMessage text = new ActiveMQTextMessage(); try { ByteArrayOutputStream bytes = new ByteArrayOutputStream(command.getContent().length + 4); DataOutputStream data = new DataOutputStream(bytes); data.writeInt(command.getContent().length); data.write(command.getContent()); text.setContent(bytes.toByteSequence()); data.close(); } else if(intendedType.equalsIgnoreCase("bytes")) { ActiveMQBytesMessage byteMessage = new ActiveMQBytesMessage(); byteMessage.writeBytes(command.getContent()); msg = byteMessage; } else { headers.remove(Stomp.Headers.CONTENT_LENGTH); ActiveMQBytesMessage bm = new ActiveMQBytesMessage(); bm.writeBytes(command.getContent()); msg = bm; } else { ActiveMQTextMessage text = new ActiveMQTextMessage(); try { ByteArrayOutputStream bytes = new ByteArrayOutputStream(command.getContent().length + 4); DataOutputStream data = new DataOutputStream(bytes); data.writeInt(command.getContent().length); data.write(command.getContent()); text.setContent(bytes.toByteSequence()); data.close();
String text = new String(command.getContent(), "UTF-8"); switch (Transformations.getValue(transformation)) { case JMS_OBJECT_XML:
String text = new String(command.getContent(), "UTF-8"); switch (Stomp.Transformations.getValue(transformation)) { case JMS_OBJECT_XML:
String text = new String(command.getContent(), "UTF-8"); switch (Transformations.getValue(transformation)) { case JMS_OBJECT_XML:
String text = new String(command.getContent(), "UTF-8"); switch (Transformations.getValue(transformation)) { case JMS_OBJECT_XML:
String text = new String(command.getContent(), "UTF-8"); switch (Transformations.getValue(transformation)) { case JMS_OBJECT_XML:
String text = new String(command.getContent(), "UTF-8"); switch (Transformations.getValue(transformation)) { case JMS_OBJECT_XML: