Class ProtocolResponse
- java.lang.Object
-
- com.digitalpebble.stormcrawler.protocol.ProtocolResponse
-
public class ProtocolResponse extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProtocolResponse.TrimmedContentReason
Enum of reasons which may cause that protocol content is trimmed.
-
Field Summary
Fields Modifier and Type Field Description static String
PROTOCOL_MD_PREFIX_PARAM
static String
PROTOCOL_VERSIONS_KEY
Key which holds the protocol version(s) used for this request (for layered protocols this field may hold multiple comma-separated values)static String
REQUEST_HEADERS_KEY
Key which holds the verbatim HTTP request headers in metadata (if supported by Protocol implementation and if http.store.headers is true).static String
REQUEST_TIME_KEY
Key which holds the request time (begin of request) in metadata.static String
RESPONSE_HEADERS_KEY
Key which holds the verbatim HTTP response headers in metadata.static String
RESPONSE_IP_KEY
Key which holds the IP address of the server the request was sent to (response received from) in metadata.static String
TRIMMED_RESPONSE_KEY
Metadata key which holds a boolean value in metadata whether the response content is trimmed or not.static String
TRIMMED_RESPONSE_REASON_KEY
Metadata key which holds the reason why content has been trimmed, seeProtocolResponse.TrimmedContentReason
.
-
Constructor Summary
Constructors Constructor Description ProtocolResponse(byte[] c, int s, Metadata md)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getContent()
Metadata
getMetadata()
int
getStatusCode()
-
-
-
Field Detail
-
REQUEST_HEADERS_KEY
public static final String REQUEST_HEADERS_KEY
Key which holds the verbatim HTTP request headers in metadata (if supported by Protocol implementation and if http.store.headers is true).- See Also:
- Constant Field Values
-
RESPONSE_HEADERS_KEY
public static final String RESPONSE_HEADERS_KEY
Key which holds the verbatim HTTP response headers in metadata.- See Also:
- Constant Field Values
-
RESPONSE_IP_KEY
public static final String RESPONSE_IP_KEY
Key which holds the IP address of the server the request was sent to (response received from) in metadata.- See Also:
- Constant Field Values
-
REQUEST_TIME_KEY
public static final String REQUEST_TIME_KEY
Key which holds the request time (begin of request) in metadata.- See Also:
- Constant Field Values
-
PROTOCOL_VERSIONS_KEY
public static final String PROTOCOL_VERSIONS_KEY
Key which holds the protocol version(s) used for this request (for layered protocols this field may hold multiple comma-separated values)- See Also:
- Constant Field Values
-
TRIMMED_RESPONSE_KEY
public static final String TRIMMED_RESPONSE_KEY
Metadata key which holds a boolean value in metadata whether the response content is trimmed or not.- See Also:
- Constant Field Values
-
TRIMMED_RESPONSE_REASON_KEY
public static final String TRIMMED_RESPONSE_REASON_KEY
Metadata key which holds the reason why content has been trimmed, seeProtocolResponse.TrimmedContentReason
.- See Also:
- Constant Field Values
-
PROTOCOL_MD_PREFIX_PARAM
public static final String PROTOCOL_MD_PREFIX_PARAM
- Since:
- 1.17
- See Also:
- Issue 776, Constant Field Values
-
-
Constructor Detail
-
ProtocolResponse
public ProtocolResponse(byte[] c, int s, Metadata md)
-
-
Method Detail
-
getContent
public byte[] getContent()
-
getStatusCode
public int getStatusCode()
-
getMetadata
public Metadata getMetadata()
-
-