org.apache.tomcat.util.http

Class BaseRequest

public class BaseRequest extends Object

A general-purpose object for representing an HTTP request.
Field Summary
static StringSCHEME_HTTP
static StringSCHEME_HTTPS
Method Summary
MessageBytesauthorization()
Get the authorization credentials
MessageBytesauthType()
Get the auth type
MessageBytescontentType()
Get the content type
Cookiescookies()
Get cookies.
ObjectgetAttribute(String name)
Get an attribute on the request
IteratorgetAttributeNames()
Get iterator over attribute names
intgetContentLength()
Get the content length
ObjectgetNote(int id)
StringgetScheme()
Get the scheme
booleangetSecure()
Get whether the request is secure or not.
intgetServerPort()
Get the server port
MimeHeadersheaders()
Get this request's headers
MessageBytesinstanceId()
Get the host id ( or jvmRoute )
MessageBytesjvmRoute()
MessageBytesmethod()
Get the method.
MessageBytesprotocol()
Get the protocol
MessageBytesqueryString()
Get the query string
voidrecycle()
Recycles this object and readies it further use.
MessageBytesremoteAddr()
Get the remote address
MessageBytesremoteHost()
Get the remote host
MessageBytesremoteUser()
Get the remote user
MessageBytesrequestURI()
Get the request uri
MessageBytesserverName()
Get the server name
voidsetAttribute(String name, Object value)
Set an attribute on the request
voidsetContentLength(int i)
Set the content length
voidsetNote(int id, Object cr)
voidsetScheme(String s)
Set the scheme.
voidsetSecure(boolean b)
Set whether the request is secure or not.
voidsetServerPort(int i)
Set the server port
StringtoString()
** SLOW ** for debugging only!

Field Detail

SCHEME_HTTP

public static final String SCHEME_HTTP

SCHEME_HTTPS

public static final String SCHEME_HTTPS

Method Detail

authorization

public MessageBytes authorization()
Get the authorization credentials

Returns: the authorization credentials

authType

public MessageBytes authType()
Get the auth type

Returns: the auth type

contentType

public MessageBytes contentType()
Get the content type

Returns: the content type

cookies

public Cookies cookies()
Get cookies.

Returns: request cookies.

getAttribute

public Object getAttribute(String name)
Get an attribute on the request

Parameters: name attribute name

Returns: attribute value

getAttributeNames

public Iterator getAttributeNames()
Get iterator over attribute names

Returns: iterator over attribute names

getContentLength

public int getContentLength()
Get the content length

Returns: the content length

getNote

public final Object getNote(int id)

getScheme

public String getScheme()
Get the scheme

Returns: the scheme

getSecure

public boolean getSecure()
Get whether the request is secure or not.

Returns: true if the request is secure.

getServerPort

public int getServerPort()
Get the server port

Returns: the server port

headers

public MimeHeaders headers()
Get this request's headers

Returns: request headers

instanceId

public MessageBytes instanceId()
Get the host id ( or jvmRoute )

Returns: the jvm route

jvmRoute

public MessageBytes jvmRoute()

method

public MessageBytes method()
Get the method.

Returns: the method

protocol

public MessageBytes protocol()
Get the protocol

Returns: the protocol

queryString

public MessageBytes queryString()
Get the query string

Returns: the query string

recycle

public void recycle()
Recycles this object and readies it further use.

remoteAddr

public MessageBytes remoteAddr()
Get the remote address

Returns: the remote address

remoteHost

public MessageBytes remoteHost()
Get the remote host

Returns: the remote host

remoteUser

public MessageBytes remoteUser()
Get the remote user

Returns: the remote user

requestURI

public MessageBytes requestURI()
Get the request uri

Returns: the request uri

serverName

public MessageBytes serverName()
Get the server name

Returns: the server name

setAttribute

public void setAttribute(String name, Object value)
Set an attribute on the request

Parameters: name attribute name value attribute value

setContentLength

public void setContentLength(int i)
Set the content length

Parameters: i the content length

setNote

public final void setNote(int id, Object cr)

setScheme

public void setScheme(String s)
Set the scheme.

Parameters: s the scheme

setSecure

public void setSecure(boolean b)
Set whether the request is secure or not.

Parameters: b true if the request is secure.

setServerPort

public void setServerPort(int i)
Set the server port

Parameters: i the server port

toString

public String toString()
** SLOW ** for debugging only!
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.