public abstract class HttpCommand extends AbstractTextCommand
Modifier and Type | Field and Description |
---|---|
static byte[] |
CONTENT_LENGTH |
static byte[] |
CONTENT_TYPE |
static byte[] |
CONTENT_TYPE_BINARY |
static byte[] |
CONTENT_TYPE_JSON |
static byte[] |
CONTENT_TYPE_PLAIN_TEXT |
static String |
HEADER_CHUNKED |
static String |
HEADER_CONTENT_LENGTH |
static String |
HEADER_CONTENT_TYPE |
static String |
HEADER_EXPECT_100 |
static byte[] |
RES_100 |
static byte[] |
RES_200 |
static byte[] |
RES_204 |
static byte[] |
RES_400 |
static byte[] |
RES_403 |
static byte[] |
RES_404 |
static byte[] |
RES_500 |
static byte[] |
RES_503 |
protected ByteBuffer |
response |
protected String |
uri |
type
Constructor and Description |
---|
HttpCommand(TextCommandConstants.TextCommandType type,
String uri) |
Modifier and Type | Method and Description |
---|---|
String |
getURI() |
void |
send200() |
void |
send204() |
void |
send400() |
void |
setResponse(byte[] value) |
void |
setResponse(byte[] contentType,
byte[] value)
HTTP/1.0 200 OK
Date: Fri, 31 Dec 1999 23:59:59 GMT
Content-TextCommandType: text/html
Content-Length: 1354
|
boolean |
shouldReply() |
String |
toString() |
boolean |
writeTo(ByteBuffer dst) |
getReadHandler, getRequestId, getType, getWriteHandler, init, isUrgent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
readFrom
public static final String HEADER_CONTENT_TYPE
public static final String HEADER_CONTENT_LENGTH
public static final String HEADER_CHUNKED
public static final String HEADER_EXPECT_100
public static final byte[] RES_200
public static final byte[] RES_400
public static final byte[] RES_403
public static final byte[] RES_404
public static final byte[] RES_100
public static final byte[] RES_204
public static final byte[] RES_503
public static final byte[] RES_500
public static final byte[] CONTENT_TYPE
public static final byte[] CONTENT_LENGTH
public static final byte[] CONTENT_TYPE_PLAIN_TEXT
public static final byte[] CONTENT_TYPE_JSON
public static final byte[] CONTENT_TYPE_BINARY
protected final String uri
protected ByteBuffer response
public HttpCommand(TextCommandConstants.TextCommandType type, String uri)
public boolean shouldReply()
shouldReply
in interface TextCommand
shouldReply
in class AbstractTextCommand
public String getURI()
public void send204()
public void send400()
public void setResponse(byte[] value)
public void send200()
public void setResponse(byte[] contentType, byte[] value)
contentType
- value
- public boolean writeTo(ByteBuffer dst)
public String toString()
toString
in class AbstractTextCommand
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.