org.simpleframework.http
Interface Protocol


public interface Protocol

This represents the HTTP header names defined in RFC 2616. It can be used to set and get headers safely from the Request and Response objects. This is used internally by the HTTP server to parse the incoming requests and also to submit response values for each conversation.

In addition to the header names this also contains some common HTTP header value tokens. These are provided for convenience and can be used to ensure that response values comply with RFC 2616.

Author:
Niall Gallagher

Field Summary
static String ACCEPT
          Specifies media types which are acceptable for the response.
static String ACCEPT_CHARSET
          Indicates what character sets are acceptable for the response.
static String ACCEPT_ENCODING
          Restricts the content codings that are acceptable in the response.
static String ACCEPT_LANGUAGE
          Restricts the set of languages that are preferred as a response.
static String ACCEPT_RANGES
          Indicates a servers acceptance of range requests for a resource.
static String AGE
          Estimates the amount of time since the response was generated.
static String ALLOW
          Lists the set of methods supported by the resource identified.
static String APPLICATION
          Represents a class of data representing an executable application.
static String AUTHORIZATION
          Sent by a client that wishes to authenticate itself with a server.
static String BOUNDARY
          Represents the token used to identify a multipart boundary.
static String CACHE_CONTROL
          Specifies directives that must be obeyed by all caching mechanisms.
static String CHARSET
          Represents the token used to identify the encoding of a message.
static String CHUNKED
          Represents the name of a self delimiting transfer encoding.
static String CLOSE
          Specifies that the server will terminate the connection.
static String CONNECTION
          Specifies options that are desired for that particular connection.
static String CONTENT_DISPOSITION
          Specifies a tag indicating of its desired presentation semantics.
static String CONTENT_ENCODING
          Indicates additional content codings have been applied to the body.
static String CONTENT_LANGUAGE
          Describes the languages of the intended audience for the body.
static String CONTENT_LENGTH
          Indicates the size of the entity body in decimal number of octets.
static String CONTENT_LOCATION
          Used to supply the resource location for the entity enclosed.
static String CONTENT_MD5
          An MD5 digest of the body for the purpose of checking integrity.
static String CONTENT_RANGE
          Specifies where in the full body a partial body should be applied.
static String CONTENT_TYPE
          Indicates the media type of the body sent to the recipient.
static String COOKIE
          Represents a cookie that contains some information from the client.
static String DATE
          Represents the date and time at which the message was originated.
static String ETAG
          Provides the value of the entity tag for the requested variant.
static String EXPECT
          Indicate that particular server behaviors are required by the client.
static String EXPIRES
          Gives the time after which the response is considered stale.
static String FROM
          Address for the human user who controls the requesting user agent.
static String HOST
          Specifies the host and port number of the resource being requested.
static String IF_MATCH
          Specifies the entity tag for a request to make it conditional.
static String IF_MODIFIED_SINCE
          If variant has not been modified since the time specified.
static String IF_NONE_MATCH
          Verify that none of those entities is current by including a list.
static String IF_RANGE
          If the entity is unchanged send me the part that I am missing.
static String IF_UNMODIFIED_SINCE
          If the requested resource has not been modified since this time.
static String IMAGE
          Represents a message type for an image such as a PNG or JPEG.
static String KEEP_ALIVE
          Specifies that the server wishes to keep the connection open.
static String LAST_MODIFIED
          Indicates the date and time at which the variant was last modified.
static String LOCATION
          Used to redirect the recipient to a location other than the URI.
static String MAX_FORWARDS
          Limit the number of proxies or gateways that can forward the request.
static String MULTIPART
          Represents a message type that contains multiple parts.
static String NO_CACHE
          Specifies that the message should not be cached by anything.
static String OCTET_STREAM
          Represents the default content type if none is specified.
static String PRAGMA
          Include implementation specific directives that might apply.
static String PROXY_AUTHENTICATE
          Challenge indicating the authentication applicable to the proxy.
static String PROXY_AUTHORIZATION
          Allows client identification for a proxy requiring authentication.
static String RANGE
          Specifies a range of bytes within a resource to be sent by a server.
static String REFERER
          Allows the client to specify the source address to the server.
static String RETRY_AFTER
          Response to indicate how long the service will be unavailable.
static String SEC_WEBSOCKET_ACCEPT
          Represents the SHA-1 digest of the clients globally unique identifier.
static String SEC_WEBSOCKET_KEY
          Represents the globally unique identifier sent by the client.
static String SEC_WEBSOCKET_PROTOCOL
          Specifies the protocol that should be used by the connected parties.
static String SEC_WEBSOCKET_VERSION
          Represents the version of the protocol that should be used.
static String SERVER
          Contains information about the software used by the origin server.
static String SET_COOKIE
          Represents some value from the server that the client should keep.
static String TE
          Indicates what extension transfer codings it is willing to accept.
static String TEXT
          Represents a message type containing human readable text.
static String TRAILER
          Indicates that these header fields is present in the trailer.
static String TRANSFER_ENCODING
          Indicates the transformation has been applied to the message body.
static String UPGRADE
          Specifies additional communication protocols the client supports.
static String URL_ENCODED
          Represents a message type that contains HTML form posted data.
static String USER_AGENT
          Contains information about the user agent originating the request.
static String VARY
          Indicates the headers that can make a cached resource stale.
static String VIA
          Used by gateways and proxies to indicate the intermediate protocols.
static String WARNING
          Used to carry additional information about the status or body.
static String WEBSOCKET
          This is the protocol token that is used when upgrading.
static String WWW_AUTHENTICATE
          Uses to challenge a client for authentication for a resource.
 

Field Detail

ACCEPT

static final String ACCEPT
Specifies media types which are acceptable for the response.

See Also:
Constant Field Values

ACCEPT_CHARSET

static final String ACCEPT_CHARSET
Indicates what character sets are acceptable for the response.

See Also:
Constant Field Values

ACCEPT_ENCODING

static final String ACCEPT_ENCODING
Restricts the content codings that are acceptable in the response.

See Also:
Constant Field Values

ACCEPT_LANGUAGE

static final String ACCEPT_LANGUAGE
Restricts the set of languages that are preferred as a response.

See Also:
Constant Field Values

ACCEPT_RANGES

static final String ACCEPT_RANGES
Indicates a servers acceptance of range requests for a resource.

See Also:
Constant Field Values

AGE

static final String AGE
Estimates the amount of time since the response was generated.

See Also:
Constant Field Values

ALLOW

static final String ALLOW
Lists the set of methods supported by the resource identified.

See Also:
Constant Field Values

AUTHORIZATION

static final String AUTHORIZATION
Sent by a client that wishes to authenticate itself with a server.

See Also:
Constant Field Values

CACHE_CONTROL

static final String CACHE_CONTROL
Specifies directives that must be obeyed by all caching mechanisms.

See Also:
Constant Field Values

CONNECTION

static final String CONNECTION
Specifies options that are desired for that particular connection.

See Also:
Constant Field Values

CONTENT_DISPOSITION

static final String CONTENT_DISPOSITION
Specifies a tag indicating of its desired presentation semantics.

See Also:
Constant Field Values

CONTENT_ENCODING

static final String CONTENT_ENCODING
Indicates additional content codings have been applied to the body.

See Also:
Constant Field Values

CONTENT_LANGUAGE

static final String CONTENT_LANGUAGE
Describes the languages of the intended audience for the body.

See Also:
Constant Field Values

CONTENT_LENGTH

static final String CONTENT_LENGTH
Indicates the size of the entity body in decimal number of octets.

See Also:
Constant Field Values

CONTENT_LOCATION

static final String CONTENT_LOCATION
Used to supply the resource location for the entity enclosed.

See Also:
Constant Field Values

CONTENT_MD5

static final String CONTENT_MD5
An MD5 digest of the body for the purpose of checking integrity.

See Also:
Constant Field Values

CONTENT_RANGE

static final String CONTENT_RANGE
Specifies where in the full body a partial body should be applied.

See Also:
Constant Field Values

CONTENT_TYPE

static final String CONTENT_TYPE
Indicates the media type of the body sent to the recipient.

See Also:
Constant Field Values

COOKIE

static final String COOKIE
Represents a cookie that contains some information from the client.

See Also:
Constant Field Values

DATE

static final String DATE
Represents the date and time at which the message was originated.

See Also:
Constant Field Values

ETAG

static final String ETAG
Provides the value of the entity tag for the requested variant.

See Also:
Constant Field Values

EXPECT

static final String EXPECT
Indicate that particular server behaviors are required by the client.

See Also:
Constant Field Values

EXPIRES

static final String EXPIRES
Gives the time after which the response is considered stale.

See Also:
Constant Field Values

FROM

static final String FROM
Address for the human user who controls the requesting user agent.

See Also:
Constant Field Values

HOST

static final String HOST
Specifies the host and port number of the resource being requested.

See Also:
Constant Field Values

IF_MATCH

static final String IF_MATCH
Specifies the entity tag for a request to make it conditional.

See Also:
Constant Field Values

IF_MODIFIED_SINCE

static final String IF_MODIFIED_SINCE
If variant has not been modified since the time specified.

See Also:
Constant Field Values

IF_NONE_MATCH

static final String IF_NONE_MATCH
Verify that none of those entities is current by including a list.

See Also:
Constant Field Values

IF_RANGE

static final String IF_RANGE
If the entity is unchanged send me the part that I am missing.

See Also:
Constant Field Values

IF_UNMODIFIED_SINCE

static final String IF_UNMODIFIED_SINCE
If the requested resource has not been modified since this time.

See Also:
Constant Field Values

LAST_MODIFIED

static final String LAST_MODIFIED
Indicates the date and time at which the variant was last modified.

See Also:
Constant Field Values

LOCATION

static final String LOCATION
Used to redirect the recipient to a location other than the URI.

See Also:
Constant Field Values

MAX_FORWARDS

static final String MAX_FORWARDS
Limit the number of proxies or gateways that can forward the request.

See Also:
Constant Field Values

PRAGMA

static final String PRAGMA
Include implementation specific directives that might apply.

See Also:
Constant Field Values

PROXY_AUTHENTICATE

static final String PROXY_AUTHENTICATE
Challenge indicating the authentication applicable to the proxy.

See Also:
Constant Field Values

PROXY_AUTHORIZATION

static final String PROXY_AUTHORIZATION
Allows client identification for a proxy requiring authentication.

See Also:
Constant Field Values

RANGE

static final String RANGE
Specifies a range of bytes within a resource to be sent by a server.

See Also:
Constant Field Values

REFERER

static final String REFERER
Allows the client to specify the source address to the server.

See Also:
Constant Field Values

RETRY_AFTER

static final String RETRY_AFTER
Response to indicate how long the service will be unavailable.

See Also:
Constant Field Values

SEC_WEBSOCKET_KEY

static final String SEC_WEBSOCKET_KEY
Represents the globally unique identifier sent by the client.

See Also:
Constant Field Values

SEC_WEBSOCKET_ACCEPT

static final String SEC_WEBSOCKET_ACCEPT
Represents the SHA-1 digest of the clients globally unique identifier.

See Also:
Constant Field Values

SEC_WEBSOCKET_PROTOCOL

static final String SEC_WEBSOCKET_PROTOCOL
Specifies the protocol that should be used by the connected parties.

See Also:
Constant Field Values

SEC_WEBSOCKET_VERSION

static final String SEC_WEBSOCKET_VERSION
Represents the version of the protocol that should be used.

See Also:
Constant Field Values

SERVER

static final String SERVER
Contains information about the software used by the origin server.

See Also:
Constant Field Values

SET_COOKIE

static final String SET_COOKIE
Represents some value from the server that the client should keep.

See Also:
Constant Field Values

TE

static final String TE
Indicates what extension transfer codings it is willing to accept.

See Also:
Constant Field Values

TRAILER

static final String TRAILER
Indicates that these header fields is present in the trailer.

See Also:
Constant Field Values

TRANSFER_ENCODING

static final String TRANSFER_ENCODING
Indicates the transformation has been applied to the message body.

See Also:
Constant Field Values

UPGRADE

static final String UPGRADE
Specifies additional communication protocols the client supports.

See Also:
Constant Field Values

USER_AGENT

static final String USER_AGENT
Contains information about the user agent originating the request.

See Also:
Constant Field Values

VARY

static final String VARY
Indicates the headers that can make a cached resource stale.

See Also:
Constant Field Values

VIA

static final String VIA
Used by gateways and proxies to indicate the intermediate protocols.

See Also:
Constant Field Values

WARNING

static final String WARNING
Used to carry additional information about the status or body.

See Also:
Constant Field Values

WWW_AUTHENTICATE

static final String WWW_AUTHENTICATE
Uses to challenge a client for authentication for a resource.

See Also:
Constant Field Values

APPLICATION

static final String APPLICATION
Represents a class of data representing an executable application.

See Also:
Constant Field Values

BOUNDARY

static final String BOUNDARY
Represents the token used to identify a multipart boundary.

See Also:
Constant Field Values

CHARSET

static final String CHARSET
Represents the token used to identify the encoding of a message.

See Also:
Constant Field Values

CHUNKED

static final String CHUNKED
Represents the name of a self delimiting transfer encoding.

See Also:
Constant Field Values

CLOSE

static final String CLOSE
Specifies that the server will terminate the connection.

See Also:
Constant Field Values

IMAGE

static final String IMAGE
Represents a message type for an image such as a PNG or JPEG.

See Also:
Constant Field Values

KEEP_ALIVE

static final String KEEP_ALIVE
Specifies that the server wishes to keep the connection open.

See Also:
Constant Field Values

MULTIPART

static final String MULTIPART
Represents a message type that contains multiple parts.

See Also:
Constant Field Values

NO_CACHE

static final String NO_CACHE
Specifies that the message should not be cached by anything.

See Also:
Constant Field Values

OCTET_STREAM

static final String OCTET_STREAM
Represents the default content type if none is specified.

See Also:
Constant Field Values

TEXT

static final String TEXT
Represents a message type containing human readable text.

See Also:
Constant Field Values

URL_ENCODED

static final String URL_ENCODED
Represents a message type that contains HTML form posted data.

See Also:
Constant Field Values

WEBSOCKET

static final String WEBSOCKET
This is the protocol token that is used when upgrading.

See Also:
Constant Field Values


Copyright © 2014. All Rights Reserved.