Package org.glassfish.grizzly.http.ajp
Class AjpHttpRequest
java.lang.Object
org.glassfish.grizzly.http.HttpPacket
org.glassfish.grizzly.http.HttpHeader
org.glassfish.grizzly.http.HttpRequestPacket
org.glassfish.grizzly.http.ajp.AjpHttpRequest
- All Implemented Interfaces:
AttributeStorage,Cacheable,MimeHeadersPacket
HttpRequestPacket implementation, which also contains AJP related meta data.- Author:
- Alexey Stashok
-
Nested Class Summary
Nested classes/interfaces inherited from class org.glassfish.grizzly.http.HttpRequestPacket
HttpRequestPacket.Builder -
Field Summary
Fields inherited from class org.glassfish.grizzly.http.HttpRequestPacket
attributes, localAddressC, localNameC, localPort, parsedMethod, READ_ONLY_ATTR_PREFIX, remoteAddressC, remoteHostC, remotePort, unparsedHostCFields inherited from class org.glassfish.grizzly.http.HttpHeader
contentLength, contentType, headers, isChunked, isCommitted, isContentBroken, isExpectContent, isSkipRemainder, parsedProtocol, protocolC, secure, upgrade -
Method Summary
Modifier and TypeMethodDescriptionstatic AjpHttpRequestcreate()protected voidgetAttribute(String name) intintintGet the instance id (or JVM route).voidrecycle()protected voidreset()Reset the internal state.voidsetContentBytesRemaining(int contentBytesRemaining) voidsetExpectContent(boolean isExpectContent) Methods inherited from class org.glassfish.grizzly.http.HttpRequestPacket
authType, builder, createNote, getAttributeNames, getConnection, getLocalAddress, getLocalHost, getLocalName, getMethod, getMethodDC, getNote, getNoteNames, getProtocolRequestId, getQueryString, getQueryStringDC, getRemoteAddress, getRemoteHost, getRequestURI, getRequestURIRef, getResponse, getServerPort, isHeadRequest, isRequest, remoteUser, removeAttribute, removeNote, requiresAcknowledgement, requiresAcknowledgement, serverName, serverNameRaw, setAttribute, setConnection, setLocalHost, setLocalPort, setMethod, setMethod, setNote, setQueryString, setRemotePort, setRequestURI, setResponse, setServerPort, toStringMethods inherited from class org.glassfish.grizzly.http.HttpHeader
addContentEncoding, addHeader, addHeader, addHeader, addHeader, containsHeader, containsHeader, extractContentEncoding, flushSpecialHeaders, getAttributes, getCharacterEncoding, getContentEncodings, getContentEncodings, getContentLength, getContentType, getContentTypeHolder, getHeader, getHeader, getHeaders, getHttpHeader, getParsingState, getProtocol, getProtocolDC, getProtocolString, getTempHeaderEncodingBuffer, getTransferEncoding, getUpgrade, getUpgradeDC, httpContentBuilder, httpTrailerBuilder, isChunked, isChunkingAllowed, isCommitted, isContentBroken, isContentEncodingsSelected, isContentTypeSet, isExpectContent, isHeader, isIgnoreContentModifiers, isSecure, isSkipRemainder, isUpgrade, makeContentLengthHeader, makeTransferEncodingHeader, makeUpgradeHeader, setCharacterEncoding, setChunked, setChunkingAllowed, setCommitted, setContentBroken, setContentEncodingsSelected, setContentLength, setContentLengthLong, setContentType, setContentType, setHeader, setHeader, setHeader, setHeader, setIgnoreContentModifiers, setProtocol, setSecure, setSkipRemainder, setTransferEncoding, setUpgradeMethods inherited from class org.glassfish.grizzly.http.HttpPacket
isHttp
-
Method Details
-
create
-
getAttribute
- Overrides:
getAttributein classHttpRequestPacket- Parameters:
name- Name of the request attribute to return- Returns:
- the specified request attribute if it exists; otherwise, return
null.
-
getLocalPort
public int getLocalPort()- Overrides:
getLocalPortin classHttpRequestPacket- Returns:
- the Internet Protocol (IP) port number of the interface on which the request was received.
-
getRemotePort
public int getRemotePort()- Overrides:
getRemotePortin classHttpRequestPacket- Returns:
- the Internet Protocol (IP) source port of the client or last proxy that sent the request.
-
localAddr
- Overrides:
localAddrin classHttpRequestPacket- Returns:
- a
DataChunkrepresenting the Internet Protocol (IP) address of the interface on which the request was received.
-
localName
- Overrides:
localNamein classHttpRequestPacket- Returns:
- a
DataChunkrepresenting the host name of the Internet Protocol (IP) interface on which the request was received.
-
remoteAddr
- Overrides:
remoteAddrin classHttpRequestPacket- Returns:
- the
DataChunkrepresenting the Internet Protocol (IP) address of the client or last proxy that sent the request.
-
remoteHostRaw
- Returns:
- the current remote host value. Unlike
remoteHost(), this method doesn't try to resolve the host name based on the currentremoteAddr()value
-
remoteHost
- Overrides:
remoteHostin classHttpRequestPacket- Returns:
- a
DataChunkrepresenting the fully qualified name of the client or the last proxy that sent the request. If the engine cannot or chooses not to resolve the host name (to improve performance), this method returns the the IP address.
-
instanceId
Get the instance id (or JVM route). Currently Ajp is sending it with each request. In future this should be fixed, and sent only once ( or 'negotiated' at config time so both tomcat and apache share the same name.- Returns:
- the instance id
-
getProcessingState
- Specified by:
getProcessingStatein classHttpHeader
-
getContentBytesRemaining
public int getContentBytesRemaining() -
setContentBytesRemaining
public void setContentBytesRemaining(int contentBytesRemaining) -
setExpectContent
public void setExpectContent(boolean isExpectContent) - Overrides:
setExpectContentin classHttpHeader
-
doParseHostHeader
protected void doParseHostHeader()- Overrides:
doParseHostHeaderin classHttpRequestPacket
-
reset
protected void reset()Description copied from class:HttpRequestPacketReset the internal state.- Overrides:
resetin classHttpRequestPacket
-
recycle
public void recycle()Description copied from class:HttpHeader- Specified by:
recyclein interfaceCacheable- Overrides:
recyclein classHttpHeader
-