public static AsciiBuffer ascii(String value) { return AsciiBuffer.ascii(value); } public static AsciiBuffer ascii(Buffer buffer) {
public static AsciiBuffer ascii(String value) { return AsciiBuffer.ascii(value); } public static AsciiBuffer ascii(Buffer buffer) {
public static AsciiBuffer ascii(Buffer buffer) { return AsciiBuffer.ascii(buffer); }
public static AsciiBuffer ascii(String value) { return AsciiBuffer.ascii(value); } public static AsciiBuffer ascii(Buffer buffer) {
public static AsciiBuffer ascii(Buffer buffer) { return AsciiBuffer.ascii(buffer); }
public static AsciiBuffer ascii(Buffer buffer) { return AsciiBuffer.ascii(buffer); }
@Override public void addSubscribeHeaders(Map<AsciiBuffer, AsciiBuffer> headerMap, boolean persistent, boolean browser, boolean noLocal, StompJmsPrefetch prefetch) throws JMSException { if (noLocal) { throw new JMSException("Server does not support 'no local' semantics over STOMP"); } if (persistent) { headerMap.put(PERSISTENT, TRUE); } if (browser) { headerMap.put(BROWSER, TRUE); } if( !prefetch.equals(DEFAULT_PREFETCH) ){ headerMap.put(CREDIT, AsciiBuffer.ascii(prefetch.getMaxMessages()+","+prefetch.getMaxBytes())); } }
@Override public void addSubscribeHeaders(Map<AsciiBuffer, AsciiBuffer> headerMap, boolean persistent, boolean browser, boolean noLocal, StompJmsPrefetch prefetch) throws JMSException { if (noLocal) { throw new JMSException("Server does not support 'no local' semantics over STOMP"); } if (persistent) { headerMap.put(PERSISTENT, TRUE); } if (browser) { headerMap.put(BROWSER, TRUE); } if( !prefetch.equals(DEFAULT_PREFETCH) ){ headerMap.put(CREDIT, AsciiBuffer.ascii(prefetch.getMaxMessages()+","+prefetch.getMaxBytes())); } }
public StompFrame createCreditFrame(StompJmsMessageConsumer consumer, StompFrame messageFrame) { final Buffer content = messageFrame.content(); String credit = "1"; if( content!=null ) { credit += ","+content.length(); } StompFrame frame = new StompFrame(); frame.action(ACK); frame.headerMap().put(SUBSCRIPTION, consumer.id); frame.headerMap().put(CREDIT, AsciiBuffer.ascii(credit)); return frame; }
public StompFrame createCreditFrame(StompJmsMessageConsumer consumer, StompFrame messageFrame) { final Buffer content = messageFrame.content(); String credit = "1"; if( content!=null ) { credit += ","+content.length(); } StompFrame frame = new StompFrame(); frame.action(ACK); frame.headerMap().put(SUBSCRIPTION, consumer.id); frame.headerMap().put(CREDIT, AsciiBuffer.ascii(credit)); return frame; }
String contentType = type.ascii().toString(); if( contentType.startsWith("text") || contentType.endsWith("json") ||
String contentType = type.ascii().toString(); if( contentType.startsWith("text") || contentType.endsWith("json") ||