org.apache.coyote.http11
Class Http11AprProtocol

java.lang.Object
  extended byorg.apache.coyote.http11.Http11AprProtocol
All Implemented Interfaces:
javax.management.MBeanRegistration, ProtocolHandler

public class Http11AprProtocol
extends java.lang.Object
implements ProtocolHandler, javax.management.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  java.util.Hashtable attributes
           
protected  java.lang.String domain
           
protected  AprEndpoint ep
           
protected static org.apache.commons.logging.Log log
           
protected  javax.management.MBeanServer mserver
           
protected  javax.management.ObjectName oname
           
protected  boolean secure
           
protected static StringManager sm
          The string manager for this package.
 
Constructor Summary
Http11AprProtocol()
           
 
Method Summary
 void destroy()
           
 Adapter getAdapter()
           
 java.net.InetAddress getAddress()
           
 java.lang.Object getAttribute(java.lang.String key)
           
 java.util.Iterator getAttributeNames()
           
 int getBacklog()
           
 java.lang.String getCompressableMimeType()
           
 java.lang.String getCompression()
           
 int getCompressionMinSize()
           
 boolean getDisableUploadTimeout()
           
 java.lang.String getDomain()
           
 int getFirstReadTimeout()
           
 boolean getKeepAlive()
          Return the Keep-Alive policy for the connection.
 int getMaxHeaderCount()
           
 int getMaxHttpHeaderSize()
           
 int getMaxKeepAliveRequests()
           
 int getMaxSavePostSize()
           
 int getMaxThreads()
           
 java.lang.String getName()
           
 java.lang.String getNoCompressionUserAgents()
           
 javax.management.ObjectName getObjectName()
           
 int getPollerSize()
           
 int getPollTime()
           
 int getPort()
           
 java.lang.String getProperty(java.lang.String name)
          Get a property
 java.lang.String getProtocol()
           
 java.lang.String getRestrictedUserAgents()
           
 boolean getSecure()
           
 int getSendfileSize()
           
 java.lang.String getServer()
           
 int getSocketBuffer()
           
 int getSocketCloseDelay()
           
 int getSoLinger()
           
 int getSoTimeout()
           
 java.lang.String getSSLCACertificateFile()
          SSL CA certificate file.
 java.lang.String getSSLCACertificatePath()
          SSL CA certificate path.
 java.lang.String getSSLCARevocationFile()
          SSL CA revocation file.
 java.lang.String getSSLCARevocationPath()
          SSL CA revocation path.
 java.lang.String getSSLCertificateChainFile()
          SSL certificate chain file.
 java.lang.String getSSLCertificateFile()
          SSL certificate file.
 java.lang.String getSSLCertificateKeyFile()
          SSL certificate key file.
 java.lang.String getSSLCipherSuite()
          SSL cipher suite.
 java.lang.String getSSLEngine()
          SSL engine.
 java.lang.String getSSLPassword()
          SSL password (if a cert is encrypted, and no password has been provided, a callback will ask for a password).
 java.lang.String getSSLProtocol()
          SSL protocol.
 java.lang.String getSSLVerifyClient()
          SSL verify client.
 int getSSLVerifyDepth()
          SSL verify depth.
 boolean getTcpNoDelay()
           
 int getThreadPriority()
           
 int getTimeout()
           
 boolean getUseSendfile()
           
 void init()
          Start the protocol
 void pause()
          Pause the protocol (optional).
 void postDeregister()
           
 void postRegister(java.lang.Boolean registrationDone)
           
 void preDeregister()
           
 javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)
           
 void resume()
          Resume the protocol (optional).
 void setAdapter(Adapter adapter)
          The adapter, used to call the connector
 void setAddress(java.net.InetAddress ia)
           
 void setAttribute(java.lang.String name, java.lang.Object value)
          Pass config info
 void setBacklog(int i)
           
 void setCompressableMimeType(java.lang.String valueS)
           
 void setCompression(java.lang.String valueS)
           
 void setCompressionMinSize(int valueI)
           
 void setDisableUploadTimeout(boolean isDisabled)
           
 void setFirstReadTimeout(int i)
           
 void setKeepAlive(boolean keepAlive)
          Set the keep-alive policy for this connection.
 void setMaxHeaderCount(int maxHeaderCount)
           
 void setMaxHttpHeaderSize(int valueI)
           
 void setMaxKeepAliveRequests(int mkar)
          Set the maximum number of Keep-Alive requests that we will honor.
 void setMaxSavePostSize(int valueI)
           
 void setMaxThreads(int maxThreads)
           
 void setNoCompressionUserAgents(java.lang.String valueS)
           
 void setPollerSize(int i)
           
 void setPollTime(int i)
           
 void setPort(int port)
           
 void setProperty(java.lang.String name, java.lang.String value)
          Set a property.
 void setProtocol(java.lang.String k)
           
 void setRestrictedUserAgents(java.lang.String valueS)
           
 void setSecure(boolean b)
           
 void setSendfileSize(int i)
           
 void setServer(java.lang.String server)
           
 void setSocketBuffer(int valueI)
           
 void setSocketCloseDelay(int d)
           
 void setSoLinger(int i)
           
 void setSoTimeout(int i)
           
 void setSSLCACertificateFile(java.lang.String SSLCACertificateFile)
           
 void setSSLCACertificatePath(java.lang.String SSLCACertificatePath)
           
 void setSSLCARevocationFile(java.lang.String SSLCARevocationFile)
           
 void setSSLCARevocationPath(java.lang.String SSLCARevocationPath)
           
 void setSSLCertificateChainFile(java.lang.String SSLCertificateChainFile)
           
 void setSSLCertificateFile(java.lang.String SSLCertificateFile)
           
 void setSSLCertificateKeyFile(java.lang.String SSLCertificateKeyFile)
           
 void setSSLCipherSuite(java.lang.String SSLCipherSuite)
           
 void setSSLEngine(java.lang.String SSLEngine)
           
 void setSSLPassword(java.lang.String SSLPassword)
           
 void setSSLProtocol(java.lang.String SSLProtocol)
           
 void setSSLVerifyClient(java.lang.String SSLVerifyClient)
           
 void setSSLVerifyDepth(int SSLVerifyDepth)
           
 void setTcpNoDelay(boolean b)
           
 void setThreadPriority(int threadPriority)
           
 void setTimeout(int timeouts)
           
 void setUseSendfile(boolean useSendfile)
           
 void start()
          Start the protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sm

protected static StringManager sm
The string manager for this package.


ep

protected AprEndpoint ep

secure

protected boolean secure

attributes

protected java.util.Hashtable attributes

log

protected static org.apache.commons.logging.Log log

domain

protected java.lang.String domain

oname

protected javax.management.ObjectName oname

mserver

protected javax.management.MBeanServer mserver
Constructor Detail

Http11AprProtocol

public Http11AprProtocol()
Method Detail

setAttribute

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

Specified by:
setAttribute in interface ProtocolHandler

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
Specified by:
getAttribute in interface ProtocolHandler

getAttributeNames

public java.util.Iterator getAttributeNames()
Specified by:
getAttributeNames in interface ProtocolHandler

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Set a property.


getProperty

public java.lang.String getProperty(java.lang.String name)
Get a property


setAdapter

public void setAdapter(Adapter adapter)
The adapter, used to call the connector

Specified by:
setAdapter in interface ProtocolHandler

getAdapter

public Adapter getAdapter()
Specified by:
getAdapter in interface ProtocolHandler

init

public void init()
          throws java.lang.Exception
Start the protocol

Specified by:
init in interface ProtocolHandler
Throws:
java.lang.Exception

start

public void start()
           throws java.lang.Exception
Description copied from interface: ProtocolHandler
Start the protocol.

Specified by:
start in interface ProtocolHandler
Throws:
java.lang.Exception

pause

public void pause()
           throws java.lang.Exception
Description copied from interface: ProtocolHandler
Pause the protocol (optional).

Specified by:
pause in interface ProtocolHandler
Throws:
java.lang.Exception

resume

public void resume()
            throws java.lang.Exception
Description copied from interface: ProtocolHandler
Resume the protocol (optional).

Specified by:
resume in interface ProtocolHandler
Throws:
java.lang.Exception

destroy

public void destroy()
             throws java.lang.Exception
Specified by:
destroy in interface ProtocolHandler
Throws:
java.lang.Exception

getMaxThreads

public int getMaxThreads()

setMaxThreads

public void setMaxThreads(int maxThreads)

setThreadPriority

public void setThreadPriority(int threadPriority)

getThreadPriority

public int getThreadPriority()

getBacklog

public int getBacklog()

setBacklog

public void setBacklog(int i)

getPort

public int getPort()

setPort

public void setPort(int port)

getFirstReadTimeout

public int getFirstReadTimeout()

setFirstReadTimeout

public void setFirstReadTimeout(int i)

getPollTime

public int getPollTime()

setPollTime

public void setPollTime(int i)

setPollerSize

public void setPollerSize(int i)

getPollerSize

public int getPollerSize()

setSendfileSize

public void setSendfileSize(int i)

getSendfileSize

public int getSendfileSize()

getUseSendfile

public boolean getUseSendfile()

setUseSendfile

public void setUseSendfile(boolean useSendfile)

getAddress

public java.net.InetAddress getAddress()

setAddress

public void setAddress(java.net.InetAddress ia)

getName

public java.lang.String getName()

getTcpNoDelay

public boolean getTcpNoDelay()

setTcpNoDelay

public void setTcpNoDelay(boolean b)

getDisableUploadTimeout

public boolean getDisableUploadTimeout()

setDisableUploadTimeout

public void setDisableUploadTimeout(boolean isDisabled)

getSocketBuffer

public int getSocketBuffer()

setSocketBuffer

public void setSocketBuffer(int valueI)

getCompression

public java.lang.String getCompression()

setCompression

public void setCompression(java.lang.String valueS)

getMaxSavePostSize

public int getMaxSavePostSize()

setMaxSavePostSize

public void setMaxSavePostSize(int valueI)

getMaxHttpHeaderSize

public int getMaxHttpHeaderSize()

setMaxHttpHeaderSize

public void setMaxHttpHeaderSize(int valueI)

getMaxHeaderCount

public int getMaxHeaderCount()

setMaxHeaderCount

public void setMaxHeaderCount(int maxHeaderCount)

getRestrictedUserAgents

public java.lang.String getRestrictedUserAgents()

setRestrictedUserAgents

public void setRestrictedUserAgents(java.lang.String valueS)

getNoCompressionUserAgents

public java.lang.String getNoCompressionUserAgents()

setNoCompressionUserAgents

public void setNoCompressionUserAgents(java.lang.String valueS)

getCompressableMimeType

public java.lang.String getCompressableMimeType()

setCompressableMimeType

public void setCompressableMimeType(java.lang.String valueS)

getCompressionMinSize

public int getCompressionMinSize()

setCompressionMinSize

public void setCompressionMinSize(int valueI)

getSoLinger

public int getSoLinger()

setSoLinger

public void setSoLinger(int i)

getSoTimeout

public int getSoTimeout()

setSoTimeout

public void setSoTimeout(int i)

getProtocol

public java.lang.String getProtocol()

setProtocol

public void setProtocol(java.lang.String k)

getSecure

public boolean getSecure()

setSecure

public void setSecure(boolean b)

getMaxKeepAliveRequests

public int getMaxKeepAliveRequests()

setMaxKeepAliveRequests

public void setMaxKeepAliveRequests(int mkar)
Set the maximum number of Keep-Alive requests that we will honor.


getKeepAlive

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


setKeepAlive

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


getSocketCloseDelay

public int getSocketCloseDelay()

setSocketCloseDelay

public void setSocketCloseDelay(int d)

setServer

public void setServer(java.lang.String server)

getServer

public java.lang.String getServer()

getTimeout

public int getTimeout()

setTimeout

public void setTimeout(int timeouts)

getSSLEngine

public java.lang.String getSSLEngine()
SSL engine.


setSSLEngine

public void setSSLEngine(java.lang.String SSLEngine)

getSSLProtocol

public java.lang.String getSSLProtocol()
SSL protocol.


setSSLProtocol

public void setSSLProtocol(java.lang.String SSLProtocol)

getSSLPassword

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


setSSLPassword

public void setSSLPassword(java.lang.String SSLPassword)

getSSLCipherSuite

public java.lang.String getSSLCipherSuite()
SSL cipher suite.


setSSLCipherSuite

public void setSSLCipherSuite(java.lang.String SSLCipherSuite)

getSSLCertificateFile

public java.lang.String getSSLCertificateFile()
SSL certificate file.


setSSLCertificateFile

public void setSSLCertificateFile(java.lang.String SSLCertificateFile)

getSSLCertificateKeyFile

public java.lang.String getSSLCertificateKeyFile()
SSL certificate key file.


setSSLCertificateKeyFile

public void setSSLCertificateKeyFile(java.lang.String SSLCertificateKeyFile)

getSSLCertificateChainFile

public java.lang.String getSSLCertificateChainFile()
SSL certificate chain file.


setSSLCertificateChainFile

public void setSSLCertificateChainFile(java.lang.String SSLCertificateChainFile)

getSSLCACertificatePath

public java.lang.String getSSLCACertificatePath()
SSL CA certificate path.


setSSLCACertificatePath

public void setSSLCACertificatePath(java.lang.String SSLCACertificatePath)

getSSLCACertificateFile

public java.lang.String getSSLCACertificateFile()
SSL CA certificate file.


setSSLCACertificateFile

public void setSSLCACertificateFile(java.lang.String SSLCACertificateFile)

getSSLCARevocationPath

public java.lang.String getSSLCARevocationPath()
SSL CA revocation path.


setSSLCARevocationPath

public void setSSLCARevocationPath(java.lang.String SSLCARevocationPath)

getSSLCARevocationFile

public java.lang.String getSSLCARevocationFile()
SSL CA revocation file.


setSSLCARevocationFile

public void setSSLCARevocationFile(java.lang.String SSLCARevocationFile)

getSSLVerifyClient

public java.lang.String getSSLVerifyClient()
SSL verify client.


setSSLVerifyClient

public void setSSLVerifyClient(java.lang.String SSLVerifyClient)

getSSLVerifyDepth

public int getSSLVerifyDepth()
SSL verify depth.


setSSLVerifyDepth

public void setSSLVerifyDepth(int SSLVerifyDepth)

getObjectName

public javax.management.ObjectName getObjectName()

getDomain

public java.lang.String getDomain()

preRegister

public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
                                               javax.management.ObjectName name)
                                        throws java.lang.Exception
Specified by:
preRegister in interface javax.management.MBeanRegistration
Throws:
java.lang.Exception

postRegister

public void postRegister(java.lang.Boolean registrationDone)
Specified by:
postRegister in interface javax.management.MBeanRegistration

preDeregister

public void preDeregister()
                   throws java.lang.Exception
Specified by:
preDeregister in interface javax.management.MBeanRegistration
Throws:
java.lang.Exception

postDeregister

public void postDeregister()
Specified by:
postDeregister in interface javax.management.MBeanRegistration


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.