com.sun.slamd.common.http
Class HttpConstants

java.lang.Object
  extended by com.sun.slamd.common.http.HttpConstants

public class HttpConstants
extends java.lang.Object

This class contains a number of constants for use in the HTTP Client.

Author:
cmort

Field Summary
static java.lang.String CONNECTION
          The Connection header.
static byte[] CONNECTION_BYTES
          The byte array containing the byte representation of "connection".
static java.lang.String CONTENT_LENGTH
          The Content-Length header.
static byte[] CONTENT_LENGTH_BYTES
          The byte array containing the byte representation of "content-length".
static java.lang.String DEFAULT_HTTP_HOST
          The default host.
static int DEFAULT_HTTP_PORT
          The well known http port number.
static int DEFAULT_HTTPS_PORT
          The well known https port number.
static java.lang.String DOMAIN
          The DOMAIN header.
static byte[] DOMAIN_BYTES
          The byte array containing the byte representation of "DOMAIN".
static java.lang.String EOL
          The end-of-line marker to be used in all requests as dictated by RFC 2068.
static byte[] EOL_BYTES
          The byte array containing the byte representation of e-o-l marker.
static java.lang.String EXPIRES
          The EXPIRES header.
static byte[] EXPIRES_BYTES
          The byte array containing the byte representation of "EXPIRES".
static java.lang.String FAILED_AUTH
          The name of the stat tracker used to keep track of failed authentications.
static int FORBIDDEN
          403 Forbidden.
static java.lang.String GET
          The string representation of the "GET" method.
static byte[] GET_BYTES
          The byte representation of the "GET" method.
static java.lang.String HTTP
          The protocol HTTP.
static java.lang.String HTTPS
          The protocol HTTPS.
static int INTERNAL_SERVER_ERROR
          500 Internal Server Error.
static java.lang.String KEEP_ALIVE
          The KEEP-ALIVE header.
static byte[] KEEP_ALIVE_BYTES
          The byte array containing the byte representation of "keep-alive".
static java.lang.String LOCATION
          The LOCATION header.
static byte[] LOCATION_BYTES
          The byte array containing the byte representation of "LOCATION".
static int MOVED_PERMANENTLY
          301 Moved-Permenantly.
static int MOVED_TEMPORARILY
          302 Moved-Temporarily.
static java.lang.String MOVED_TEMPORARILY_HEADER
          The MOVED-TEMPORARILY header.
static byte[] MOVED_TEMPORARILY_HEADER_BYTES
          The byte array containing the byte representation of "MOVED-TEMPORARILY".
static int NOT_FOUND
          404 Not Found.
static int OK
          200 Ok.
static java.lang.String PATH
          The PATH header.
static byte[] PATH_BYTES
          The byte array containing the byte representation of "PATH".
static java.lang.String POST
          The string representation of the "POST" method.
static byte[] POST_BYTES
          The byte representation of the "POST" method.
static java.lang.String PROTOCOL_VERSION_1_0
          The string that indicates that HTTP 1.0 is to be used for the GETs.
static java.lang.String PROTOCOL_VERSION_1_1
          The string that indicates that HTTP 1.1 is to be used for the GETs.
static int RESPONSE_EXPECTATION_FAILED
          The HTTP response that will be used if the client cannot parse the response from the server.
static java.lang.String SECURE
          The SECURE header.
static byte[] SECURE_BYTES
          The byte array containing the byte representation of "SECURE".
static java.lang.String SET_COOKIE
          The SET-COOKIE header.
static byte[] SET_COOKIE_BYTES
          The byte array containing the byte representation of "SET-COOKIE".
static java.lang.String SUCCESSFUL_AUTH
          The name of the stat tracker used to keep track of successful authentications.
static java.lang.String TOKEN1
          The string representation of the "Login.Token1" request parameter.
static java.lang.String TOKEN2
          The string representation of the "Login.Token2" request parameter.
static java.lang.String X_AUTHERRORCODE
          The string representation of the "X-AUTHERRORCODE" header.
static byte[] X_AUTHERRORCODE_BYTES
          The byte representation of the "X-AUTHERRORCODE" header.
 
Constructor Summary
HttpConstants()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OK

public static final int OK
200 Ok.

See Also:
Constant Field Values

MOVED_PERMANENTLY

public static final int MOVED_PERMANENTLY
301 Moved-Permenantly.

See Also:
Constant Field Values

MOVED_TEMPORARILY

public static final int MOVED_TEMPORARILY
302 Moved-Temporarily.

See Also:
Constant Field Values

FORBIDDEN

public static final int FORBIDDEN
403 Forbidden.

See Also:
Constant Field Values

NOT_FOUND

public static final int NOT_FOUND
404 Not Found.

See Also:
Constant Field Values

INTERNAL_SERVER_ERROR

public static final int INTERNAL_SERVER_ERROR
500 Internal Server Error.

See Also:
Constant Field Values

DEFAULT_HTTP_HOST

public static final java.lang.String DEFAULT_HTTP_HOST
The default host.

See Also:
Constant Field Values

DEFAULT_HTTP_PORT

public static final int DEFAULT_HTTP_PORT
The well known http port number.

See Also:
Constant Field Values

DEFAULT_HTTPS_PORT

public static final int DEFAULT_HTTPS_PORT
The well known https port number.

See Also:
Constant Field Values

HTTP

public static final java.lang.String HTTP
The protocol HTTP.

See Also:
Constant Field Values

HTTPS

public static final java.lang.String HTTPS
The protocol HTTPS.

See Also:
Constant Field Values

PROTOCOL_VERSION_1_0

public static final java.lang.String PROTOCOL_VERSION_1_0
The string that indicates that HTTP 1.0 is to be used for the GETs.

See Also:
Constant Field Values

PROTOCOL_VERSION_1_1

public static final java.lang.String PROTOCOL_VERSION_1_1
The string that indicates that HTTP 1.1 is to be used for the GETs.

See Also:
Constant Field Values

EOL

public static final java.lang.String EOL
The end-of-line marker to be used in all requests as dictated by RFC 2068.

See Also:
Constant Field Values

EOL_BYTES

public static final byte[] EOL_BYTES
The byte array containing the byte representation of e-o-l marker.


CONNECTION

public static final java.lang.String CONNECTION
The Connection header.

See Also:
Constant Field Values

CONNECTION_BYTES

public static final byte[] CONNECTION_BYTES
The byte array containing the byte representation of "connection".


CONTENT_LENGTH

public static final java.lang.String CONTENT_LENGTH
The Content-Length header.

See Also:
Constant Field Values

CONTENT_LENGTH_BYTES

public static final byte[] CONTENT_LENGTH_BYTES
The byte array containing the byte representation of "content-length".


KEEP_ALIVE

public static final java.lang.String KEEP_ALIVE
The KEEP-ALIVE header.

See Also:
Constant Field Values

KEEP_ALIVE_BYTES

public static final byte[] KEEP_ALIVE_BYTES
The byte array containing the byte representation of "keep-alive".


MOVED_TEMPORARILY_HEADER

public static final java.lang.String MOVED_TEMPORARILY_HEADER
The MOVED-TEMPORARILY header.

See Also:
Constant Field Values

MOVED_TEMPORARILY_HEADER_BYTES

public static final byte[] MOVED_TEMPORARILY_HEADER_BYTES
The byte array containing the byte representation of "MOVED-TEMPORARILY".


LOCATION

public static final java.lang.String LOCATION
The LOCATION header.

See Also:
Constant Field Values

LOCATION_BYTES

public static final byte[] LOCATION_BYTES
The byte array containing the byte representation of "LOCATION".


SET_COOKIE

public static final java.lang.String SET_COOKIE
The SET-COOKIE header.

See Also:
Constant Field Values

SET_COOKIE_BYTES

public static final byte[] SET_COOKIE_BYTES
The byte array containing the byte representation of "SET-COOKIE".


DOMAIN

public static final java.lang.String DOMAIN
The DOMAIN header.

See Also:
Constant Field Values

DOMAIN_BYTES

public static final byte[] DOMAIN_BYTES
The byte array containing the byte representation of "DOMAIN".


PATH

public static final java.lang.String PATH
The PATH header.

See Also:
Constant Field Values

PATH_BYTES

public static final byte[] PATH_BYTES
The byte array containing the byte representation of "PATH".


EXPIRES

public static final java.lang.String EXPIRES
The EXPIRES header.

See Also:
Constant Field Values

EXPIRES_BYTES

public static final byte[] EXPIRES_BYTES
The byte array containing the byte representation of "EXPIRES".


SECURE

public static final java.lang.String SECURE
The SECURE header.

See Also:
Constant Field Values

SECURE_BYTES

public static final byte[] SECURE_BYTES
The byte array containing the byte representation of "SECURE".


RESPONSE_EXPECTATION_FAILED

public static final int RESPONSE_EXPECTATION_FAILED
The HTTP response that will be used if the client cannot parse the response from the server. Technically, this is reserved for other uses by the HTTP protocol, but the geniuses that developed the protocol did not define any response codes for client-side errors, so I'm using it for this as well.

See Also:
Constant Field Values

GET

public static final java.lang.String GET
The string representation of the "GET" method.

See Also:
Constant Field Values

GET_BYTES

public static final byte[] GET_BYTES
The byte representation of the "GET" method.


POST

public static final java.lang.String POST
The string representation of the "POST" method.

See Also:
Constant Field Values

POST_BYTES

public static final byte[] POST_BYTES
The byte representation of the "POST" method.


X_AUTHERRORCODE

public static final java.lang.String X_AUTHERRORCODE
The string representation of the "X-AUTHERRORCODE" header.

See Also:
Constant Field Values

X_AUTHERRORCODE_BYTES

public static final byte[] X_AUTHERRORCODE_BYTES
The byte representation of the "X-AUTHERRORCODE" header.


TOKEN1

public static final java.lang.String TOKEN1
The string representation of the "Login.Token1" request parameter.

See Also:
Constant Field Values

TOKEN2

public static final java.lang.String TOKEN2
The string representation of the "Login.Token2" request parameter.

See Also:
Constant Field Values

SUCCESSFUL_AUTH

public static final java.lang.String SUCCESSFUL_AUTH
The name of the stat tracker used to keep track of successful authentications.

See Also:
Constant Field Values

FAILED_AUTH

public static final java.lang.String FAILED_AUTH
The name of the stat tracker used to keep track of failed authentications.

See Also:
Constant Field Values
Constructor Detail

HttpConstants

public HttpConstants()