io.liveoak.stomp.StompMessage.java Source code

Java tutorial

Introduction

Here is the source code for io.liveoak.stomp.StompMessage.java

Source

/*
 * Copyright 2013 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Eclipse Public License version 1.0, available at http://www.eclipse.org/legal/epl-v10.html
 */
package io.liveoak.stomp;

import java.nio.charset.Charset;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufHolder;

/**
 * @author Bob McWhirter
 */
public interface StompMessage extends ByteBufHolder {

    String id();

    Headers headers();

    String destination();

    void destination(String destination);

    String contentType();

    void contentType(String contentType);

    String content(Charset charset);

    String utf8Content();

    void content(String content, Charset charset);

    void content(String content);

    ByteBuf content();

    void content(ByteBuf content);

    boolean isError();

    void ack() throws StompException;

    void nack() throws StompException;

    void ack(String transactionId) throws StompException;

    void nack(String transactionId) throws StompException;

    StompMessage duplicate();

    StompMessage retain();

}