org.apache.coyote.http11

Class Http11AprProtocol

public class Http11AprProtocol extends Object implements ProtocolHandler, MBeanRegistration

Abstract the protocol implementation, including threading, etc. Processor is single threaded and specific to stream-based protocols, will not fit Jk protocols like JNI.

Author: Remy Maucherat Costin Manolache

Field Summary
protected Adapteradapter
The adapter, used to call the connector.
protected HashMap<String,Object>attributes
protected StringcompressableMimeTypes
protected Stringcompression
Integrated compression support.
protected intcompressionMinSize
protected booleandisableUploadTimeout
If true, the regular socket timeout will be used for the full duration of the connection.
protected Stringdomain
protected AprEndpointendpoint
protected static Loglog
protected intmaxHttpHeaderSize
Maximum size of the HTTP message header.
protected intmaxKeepAliveRequests
Maximum number of requests which can be performed over a keepalive connection.
protected intmaxSavePostSize
Maximum size of the post which will be saved when processing certain requests, such as a POST.
protected MBeanServermserver
protected StringnoCompressionUserAgents
protected ObjectNameoname
protected intprocessorCache
Processor cache.
protected Stringprotocol
protected StringrestrictedUserAgents
User agents regular expressions which should be restricted to HTTP/1.0 support.
protected booleansecure
This field indicates if the protocol is secure from the perspective of the client (= https is used).
protected Stringserver
Server header.
protected static StringManagersm
The string manager for this package.
protected intsocketBuffer
protected inttimeout
This timeout represents the socket timeout which will be used while the adapter execution is in progress, unless disableUploadTimeout is set to true.
Constructor Summary
Http11AprProtocol()
Method Summary
voiddestroy()
AdaptergetAdapter()
InetAddressgetAddress()
ObjectgetAttribute(String key)
IteratorgetAttributeNames()
intgetBacklog()
StringgetCompressableMimeType()
StringgetCompression()
intgetCompressionMinSize()
booleangetDeferAccept()
booleangetDisableUploadTimeout()
StringgetDomain()
ExecutorgetExecutor()
booleangetKeepAlive()
Return the Keep-Alive policy for the connection.
intgetKeepAliveTimeout()
The number of seconds Tomcat will wait for a subsequent request before closing the connection.
intgetMaxHttpHeaderSize()
intgetMaxKeepAliveRequests()
intgetMaxSavePostSize()
intgetMaxThreads()
StringgetName()
StringgetNoCompressionUserAgents()
ObjectNamegetObjectName()
intgetPollerSize()
intgetPollerThreadCount()
intgetPollTime()
intgetPort()
intgetProcessorCache()
StringgetProtocol()
StringgetRestrictedUserAgents()
booleangetSecure()
intgetSendfileSize()
intgetSendfileThreadCount()
StringgetServer()
intgetSocketBuffer()
intgetSoLinger()
intgetSoTimeout()
StringgetSSLCACertificateFile()
SSL CA certificate file.
StringgetSSLCACertificatePath()
SSL CA certificate path.
StringgetSSLCARevocationFile()
SSL CA revocation file.
StringgetSSLCARevocationPath()
SSL CA revocation path.
StringgetSSLCertificateChainFile()
SSL certificate chain file.
StringgetSSLCertificateFile()
SSL certificate file.
StringgetSSLCertificateKeyFile()
SSL certificate key file.
StringgetSSLCipherSuite()
SSL cipher suite.
StringgetSSLPassword()
SSL password (if a cert is encrypted, and no password has been provided, a callback will ask for a password).
StringgetSSLProtocol()
SSL protocol.
StringgetSSLVerifyClient()
SSL verify client.
intgetSSLVerifyDepth()
SSL verify depth.
booleangetTcpNoDelay()
intgetThreadPriority()
intgetTimeout()
intgetUnlockTimeout()
booleangetUseSendfile()
voidinit()
Start the protocol
booleanisSSLEnabled()
SSL engine.
voidpause()
voidpostDeregister()
voidpostRegister(Boolean registrationDone)
voidpreDeregister()
ObjectNamepreRegister(MBeanServer server, ObjectName name)
voidresume()
voidsetAdapter(Adapter adapter)
voidsetAddress(InetAddress ia)
voidsetAttribute(String name, Object value)
Pass config info
voidsetBacklog(int backlog)
voidsetCompressableMimeType(String valueS)
voidsetCompression(String valueS)
voidsetCompressionMinSize(int valueI)
voidsetDeferAccept(boolean deferAccept)
voidsetDisableUploadTimeout(boolean isDisabled)
voidsetExecutor(Executor executor)
voidsetKeepAlive(boolean keepAlive)
Set the keep-alive policy for this connection.
voidsetKeepAliveTimeout(int timeout)
voidsetMaxHttpHeaderSize(int valueI)
voidsetMaxKeepAliveRequests(int mkar)
voidsetMaxSavePostSize(int valueI)
voidsetMaxThreads(int maxThreads)
voidsetNoCompressionUserAgents(String valueS)
voidsetPollerSize(int pollerSize)
voidsetPollerThreadCount(int pollerThreadCount)
voidsetPollTime(int pollTime)
voidsetPort(int port)
voidsetProcessorCache(int processorCache)
voidsetProtocol(String protocol)
voidsetRestrictedUserAgents(String valueS)
voidsetSecure(boolean b)
voidsetSendfileSize(int sendfileSize)
voidsetSendfileThreadCount(int sendfileThreadCount)
voidsetServer(String server)
voidsetSocketBuffer(int socketBuffer)
voidsetSoLinger(int soLinger)
voidsetSoTimeout(int soTimeout)
voidsetSSLCACertificateFile(String SSLCACertificateFile)
voidsetSSLCACertificatePath(String SSLCACertificatePath)
voidsetSSLCARevocationFile(String SSLCARevocationFile)
voidsetSSLCARevocationPath(String SSLCARevocationPath)
voidsetSSLCertificateChainFile(String SSLCertificateChainFile)
voidsetSSLCertificateFile(String SSLCertificateFile)
voidsetSSLCertificateKeyFile(String SSLCertificateKeyFile)
voidsetSSLCipherSuite(String SSLCipherSuite)
voidsetSSLEnabled(boolean SSLEnabled)
voidsetSSLPassword(String SSLPassword)
voidsetSSLProtocol(String SSLProtocol)
voidsetSSLVerifyClient(String SSLVerifyClient)
voidsetSSLVerifyDepth(int SSLVerifyDepth)
voidsetTcpNoDelay(boolean tcpNoDelay)
voidsetThreadPriority(int threadPriority)
voidsetTimeout(int timeout)
voidsetUnlockTimeout(int unlockTimeout)
voidsetUseSendfile(boolean useSendfile)
voidstart()

Field Detail

adapter

protected Adapter adapter
The adapter, used to call the connector.

attributes

protected HashMap<String,Object> attributes

compressableMimeTypes

protected String compressableMimeTypes

compression

protected String compression
Integrated compression support.

compressionMinSize

protected int compressionMinSize

disableUploadTimeout

protected boolean disableUploadTimeout
If true, the regular socket timeout will be used for the full duration of the connection.

domain

protected String domain

endpoint

protected AprEndpoint endpoint

log

protected static Log log

maxHttpHeaderSize

protected int maxHttpHeaderSize
Maximum size of the HTTP message header.

maxKeepAliveRequests

protected int maxKeepAliveRequests
Maximum number of requests which can be performed over a keepalive connection. The default is the same as for Apache HTTP Server.

maxSavePostSize

protected int maxSavePostSize
Maximum size of the post which will be saved when processing certain requests, such as a POST.

mserver

protected MBeanServer mserver

noCompressionUserAgents

protected String noCompressionUserAgents

oname

protected ObjectName oname

processorCache

protected int processorCache
Processor cache.

protocol

protected String protocol

restrictedUserAgents

protected String restrictedUserAgents
User agents regular expressions which should be restricted to HTTP/1.0 support.

secure

protected boolean secure
This field indicates if the protocol is secure from the perspective of the client (= https is used).

server

protected String server
Server header.

sm

protected static StringManager sm
The string manager for this package.

socketBuffer

protected int socketBuffer

timeout

protected int timeout
This timeout represents the socket timeout which will be used while the adapter execution is in progress, unless disableUploadTimeout is set to true. The default is the same as for Apache HTTP Server (300 000 milliseconds).

Constructor Detail

Http11AprProtocol

public Http11AprProtocol()

Method Detail

destroy

public void destroy()

getAdapter

public Adapter getAdapter()

getAddress

public InetAddress getAddress()

getAttribute

public Object getAttribute(String key)

getAttributeNames

public Iterator getAttributeNames()

getBacklog

public int getBacklog()

getCompressableMimeType

public String getCompressableMimeType()

getCompression

public String getCompression()

getCompressionMinSize

public int getCompressionMinSize()

getDeferAccept

public boolean getDeferAccept()

getDisableUploadTimeout

public boolean getDisableUploadTimeout()

getDomain

public String getDomain()

getExecutor

public Executor getExecutor()

getKeepAlive

public boolean getKeepAlive()
Return the Keep-Alive policy for the connection.

getKeepAliveTimeout

public int getKeepAliveTimeout()
The number of seconds Tomcat will wait for a subsequent request before closing the connection.

getMaxHttpHeaderSize

public int getMaxHttpHeaderSize()

getMaxKeepAliveRequests

public int getMaxKeepAliveRequests()

getMaxSavePostSize

public int getMaxSavePostSize()

getMaxThreads

public int getMaxThreads()

getName

public String getName()

getNoCompressionUserAgents

public String getNoCompressionUserAgents()

getObjectName

public ObjectName getObjectName()

getPollerSize

public int getPollerSize()

getPollerThreadCount

public int getPollerThreadCount()

getPollTime

public int getPollTime()

getPort

public int getPort()

getProcessorCache

public int getProcessorCache()

getProtocol

public String getProtocol()

getRestrictedUserAgents

public String getRestrictedUserAgents()

getSecure

public boolean getSecure()

getSendfileSize

public int getSendfileSize()

getSendfileThreadCount

public int getSendfileThreadCount()

getServer

public String getServer()

getSocketBuffer

public int getSocketBuffer()

getSoLinger

public int getSoLinger()

getSoTimeout

public int getSoTimeout()

getSSLCACertificateFile

public String getSSLCACertificateFile()
SSL CA certificate file.

getSSLCACertificatePath

public String getSSLCACertificatePath()
SSL CA certificate path.

getSSLCARevocationFile

public String getSSLCARevocationFile()
SSL CA revocation file.

getSSLCARevocationPath

public String getSSLCARevocationPath()
SSL CA revocation path.

getSSLCertificateChainFile

public String getSSLCertificateChainFile()
SSL certificate chain file.

getSSLCertificateFile

public String getSSLCertificateFile()
SSL certificate file.

getSSLCertificateKeyFile

public String getSSLCertificateKeyFile()
SSL certificate key file.

getSSLCipherSuite

public String getSSLCipherSuite()
SSL cipher suite.

getSSLPassword

public String getSSLPassword()
SSL password (if a cert is encrypted, and no password has been provided, a callback will ask for a password).

getSSLProtocol

public String getSSLProtocol()
SSL protocol.

getSSLVerifyClient

public String getSSLVerifyClient()
SSL verify client.

getSSLVerifyDepth

public int getSSLVerifyDepth()
SSL verify depth.

getTcpNoDelay

public boolean getTcpNoDelay()

getThreadPriority

public int getThreadPriority()

getTimeout

public int getTimeout()

getUnlockTimeout

public int getUnlockTimeout()

getUseSendfile

public boolean getUseSendfile()

init

public void init()
Start the protocol

isSSLEnabled

public boolean isSSLEnabled()
SSL engine.

pause

public void pause()

postDeregister

public void postDeregister()

postRegister

public void postRegister(Boolean registrationDone)

preDeregister

public void preDeregister()

preRegister

public ObjectName preRegister(MBeanServer server, ObjectName name)

resume

public void resume()

setAdapter

public void setAdapter(Adapter adapter)

setAddress

public void setAddress(InetAddress ia)

setAttribute

public void setAttribute(String name, Object value)
Pass config info

setBacklog

public void setBacklog(int backlog)

setCompressableMimeType

public void setCompressableMimeType(String valueS)

setCompression

public void setCompression(String valueS)

setCompressionMinSize

public void setCompressionMinSize(int valueI)

setDeferAccept

public void setDeferAccept(boolean deferAccept)

setDisableUploadTimeout

public void setDisableUploadTimeout(boolean isDisabled)

setExecutor

public void setExecutor(Executor executor)

setKeepAlive

public void setKeepAlive(boolean keepAlive)
Set the keep-alive policy for this connection.

setKeepAliveTimeout

public void setKeepAliveTimeout(int timeout)

setMaxHttpHeaderSize

public void setMaxHttpHeaderSize(int valueI)

setMaxKeepAliveRequests

public void setMaxKeepAliveRequests(int mkar)

setMaxSavePostSize

public void setMaxSavePostSize(int valueI)

setMaxThreads

public void setMaxThreads(int maxThreads)

setNoCompressionUserAgents

public void setNoCompressionUserAgents(String valueS)

setPollerSize

public void setPollerSize(int pollerSize)

setPollerThreadCount

public void setPollerThreadCount(int pollerThreadCount)

setPollTime

public void setPollTime(int pollTime)

setPort

public void setPort(int port)

setProcessorCache

public void setProcessorCache(int processorCache)

setProtocol

public void setProtocol(String protocol)

setRestrictedUserAgents

public void setRestrictedUserAgents(String valueS)

setSecure

public void setSecure(boolean b)

setSendfileSize

public void setSendfileSize(int sendfileSize)

setSendfileThreadCount

public void setSendfileThreadCount(int sendfileThreadCount)

setServer

public void setServer(String server)

setSocketBuffer

public void setSocketBuffer(int socketBuffer)

setSoLinger

public void setSoLinger(int soLinger)

setSoTimeout

public void setSoTimeout(int soTimeout)

setSSLCACertificateFile

public void setSSLCACertificateFile(String SSLCACertificateFile)

setSSLCACertificatePath

public void setSSLCACertificatePath(String SSLCACertificatePath)

setSSLCARevocationFile

public void setSSLCARevocationFile(String SSLCARevocationFile)

setSSLCARevocationPath

public void setSSLCARevocationPath(String SSLCARevocationPath)

setSSLCertificateChainFile

public void setSSLCertificateChainFile(String SSLCertificateChainFile)

setSSLCertificateFile

public void setSSLCertificateFile(String SSLCertificateFile)

setSSLCertificateKeyFile

public void setSSLCertificateKeyFile(String SSLCertificateKeyFile)

setSSLCipherSuite

public void setSSLCipherSuite(String SSLCipherSuite)

setSSLEnabled

public void setSSLEnabled(boolean SSLEnabled)

setSSLPassword

public void setSSLPassword(String SSLPassword)

setSSLProtocol

public void setSSLProtocol(String SSLProtocol)

setSSLVerifyClient

public void setSSLVerifyClient(String SSLVerifyClient)

setSSLVerifyDepth

public void setSSLVerifyDepth(int SSLVerifyDepth)

setTcpNoDelay

public void setTcpNoDelay(boolean tcpNoDelay)

setThreadPriority

public void setThreadPriority(int threadPriority)

setTimeout

public void setTimeout(int timeout)

setUnlockTimeout

public void setUnlockTimeout(int unlockTimeout)

setUseSendfile

public void setUseSendfile(boolean useSendfile)

start

public void start()
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.