org.elasticsearch.transport.support
Class TransportStreams

java.lang.Object
  extended by org.elasticsearch.transport.support.TransportStreams

public class TransportStreams
extends java.lang.Object


Field Summary
static int HEADER_SIZE
           
 
Constructor Summary
TransportStreams()
           
 
Method Summary
static byte[] buildRequest(long requestId, java.lang.String action, Streamable message, TransportRequestOptions options)
           
static byte[] buildResponse(long requestId, Streamable message, TransportResponseOptions options)
           
static boolean statusIsCompress(byte value)
           
static boolean statusIsError(byte value)
           
static boolean statusIsRequest(byte value)
           
static byte statusSetCompress(byte value)
           
static byte statusSetError(byte value)
           
static byte statusSetRequest(byte value)
           
static byte statusSetResponse(byte value)
           
static void writeHeader(byte[] data, int dataLength, long requestId, byte status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADER_SIZE

public static final int HEADER_SIZE
See Also:
Constant Field Values
Constructor Detail

TransportStreams

public TransportStreams()
Method Detail

writeHeader

public static void writeHeader(byte[] data,
                               int dataLength,
                               long requestId,
                               byte status)

statusIsRequest

public static boolean statusIsRequest(byte value)

statusSetRequest

public static byte statusSetRequest(byte value)

statusSetResponse

public static byte statusSetResponse(byte value)

statusIsError

public static boolean statusIsError(byte value)

statusSetError

public static byte statusSetError(byte value)

statusIsCompress

public static boolean statusIsCompress(byte value)

statusSetCompress

public static byte statusSetCompress(byte value)

buildRequest

public static byte[] buildRequest(long requestId,
                                  java.lang.String action,
                                  Streamable message,
                                  TransportRequestOptions options)
                           throws java.io.IOException
Throws:
java.io.IOException

buildResponse

public static byte[] buildResponse(long requestId,
                                   Streamable message,
                                   TransportResponseOptions options)
                            throws java.io.IOException
Throws:
java.io.IOException