org.apache.coyote.http11
Class Http11BaseProtocol

java.lang.Object
  extended byorg.apache.coyote.http11.Http11BaseProtocol
All Implemented Interfaces:
ProtocolHandler
Direct Known Subclasses:
Http11Protocol

public class Http11BaseProtocol
extends java.lang.Object
implements ProtocolHandler

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  org.apache.coyote.http11.Http11BaseProtocol.Http11ConnectionHandler cHandler
           
protected  PoolTcpEndpoint ep
           
protected static org.apache.commons.logging.Log log
           
protected  boolean secure
           
protected static StringManager sm
          The string manager for this package.
protected  ServerSocketFactory socketFactory
           
protected  java.lang.String socketFactoryName
           
protected  SSLImplementation sslImplementation
           
protected  java.lang.String sslImplementationName
           
static int THREAD_DATA_OBJECT_NAME
           
static int THREAD_DATA_PROCESSOR
           
protected  ThreadPool tp
           
 
Constructor Summary
Http11BaseProtocol()
           
 
Method Summary
protected  org.apache.coyote.http11.Http11BaseProtocol.Http11ConnectionHandler createConnectionHandler()
           
 void destroy()
           
 Adapter getAdapter()
           
 java.net.InetAddress getAddress()
           
 java.lang.String getAlgorithm()
           
 java.lang.Object getAttribute(java.lang.String key)
           
 java.util.Iterator getAttributeNames()
           
 int getBacklog()
           
 java.lang.String getCiphers()
           
 java.lang.String getClientauth()
           
 java.lang.String getCompressableMimeType()
           
 java.lang.String getCompression()
           
 int getCompressionMinSize()
           
 boolean getDisableUploadTimeout()
           
 boolean getKeepAlive()
          Return the Keep-Alive policy for the connection.
 java.lang.String getKeyAlias()
           
 java.lang.String getKeypass()
           
 java.lang.String getKeystore()
           
 java.lang.String getKeytype()
           
 int getMaxHeaderCount()
           
 int getMaxHttpHeaderSize()
           
 int getMaxKeepAliveRequests()
           
 int getMaxSavePostSize()
           
 int getMaxSpareThreads()
           
 int getMaxThreads()
           
 int getMinSpareThreads()
           
 java.lang.String getName()
           
 java.lang.String getNoCompressionUserAgents()
           
 int getPort()
           
 java.lang.String getProperty(java.lang.String name)
          Get a property
 java.lang.String getProtocol()
           
 java.lang.String getProtocols()
           
 java.lang.String getReportedname()
           
 java.lang.String getRestrictedUserAgents()
           
 boolean getSecure()
           
 java.lang.String getServer()
           
 int getServerSoTimeout()
           
 int getSocketBuffer()
           
 int getSocketCloseDelay()
           
 java.lang.String getSocketFactory()
           
 int getSoLinger()
           
 int getSoTimeout()
           
 java.lang.String getSSLImplementation()
           
 java.lang.String getStrategy()
           
 boolean getTcpNoDelay()
           
 int getThreadPriority()
           
 int getTimeout()
           
 void init()
          Start the protocol
 void pause()
          Pause the protocol (optional).
 void resume()
          Resume the protocol (optional).
 void setAdapter(Adapter adapter)
          The adapter, used to call the connector
 void setAddress(java.net.InetAddress ia)
           
 void setAlgorithm(java.lang.String k)
           
 void setAttribute(java.lang.String name, java.lang.Object value)
          Pass config info
 void setBacklog(int i)
           
 void setCiphers(java.lang.String ciphers)
           
 void setClientauth(java.lang.String k)
           
 void setCompressableMimeType(java.lang.String valueS)
           
 void setCompression(java.lang.String valueS)
           
 void setCompressionMinSize(int valueI)
           
 void setDisableUploadTimeout(boolean isDisabled)
           
 void setKeepAlive(boolean keepAlive)
          Set the keep-alive policy for this connection.
 void setKeyAlias(java.lang.String keyAlias)
           
 void setKeypass(java.lang.String k)
           
 void setKeystore(java.lang.String k)
           
 void setKeytype(java.lang.String k)
           
 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 setMaxSpareThreads(int maxThreads)
           
 void setMaxThreads(int maxThreads)
           
 void setMinSpareThreads(int minSpareThreads)
           
 void setNoCompressionUserAgents(java.lang.String valueS)
           
 void setPort(int port)
           
 void setProperty(java.lang.String name, java.lang.String value)
          Set a property.
 void setProtocol(java.lang.String k)
           
 void setProtocols(java.lang.String k)
           
 void setReportedname(java.lang.String reportedName)
           
 void setRestrictedUserAgents(java.lang.String valueS)
           
 void setSecure(boolean b)
           
 void setServer(java.lang.String server)
           
 void setServerSoTimeout(int i)
           
 void setSocketBuffer(int valueI)
           
 void setSocketCloseDelay(int d)
           
 void setSocketFactory(java.lang.String valueS)
           
 void setSoLinger(int i)
           
 void setSoTimeout(int i)
           
 void setSSLImplementation(java.lang.String valueS)
           
 void setStrategy(java.lang.String strategy)
           
 void setTcpNoDelay(boolean b)
           
 void setThreadPriority(int threadPriority)
           
 void setTimeout(int timeouts)
           
 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.


tp

protected ThreadPool tp

ep

protected PoolTcpEndpoint ep

secure

protected boolean secure

socketFactory

protected ServerSocketFactory socketFactory

sslImplementation

protected SSLImplementation sslImplementation

attributes

protected java.util.Hashtable attributes

socketFactoryName

protected java.lang.String socketFactoryName

sslImplementationName

protected java.lang.String sslImplementationName

cHandler

protected org.apache.coyote.http11.Http11BaseProtocol.Http11ConnectionHandler cHandler

THREAD_DATA_PROCESSOR

public static final int THREAD_DATA_PROCESSOR
See Also:
Constant Field Values

THREAD_DATA_OBJECT_NAME

public static final int THREAD_DATA_OBJECT_NAME
See Also:
Constant Field Values

log

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

Http11BaseProtocol

public Http11BaseProtocol()
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

createConnectionHandler

protected org.apache.coyote.http11.Http11BaseProtocol.Http11ConnectionHandler createConnectionHandler()

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)

getMaxSpareThreads

public int getMaxSpareThreads()

setMaxSpareThreads

public void setMaxSpareThreads(int maxThreads)

getMinSpareThreads

public int getMinSpareThreads()

setMinSpareThreads

public void setMinSpareThreads(int minSpareThreads)

setThreadPriority

public void setThreadPriority(int threadPriority)

getThreadPriority

public int getThreadPriority()

setStrategy

public void setStrategy(java.lang.String strategy)

getStrategy

public java.lang.String getStrategy()

getBacklog

public int getBacklog()

setBacklog

public void setBacklog(int i)

getPort

public int getPort()

setPort

public void setPort(int port)

getAddress

public java.net.InetAddress getAddress()

setAddress

public void setAddress(java.net.InetAddress ia)

getName

public java.lang.String getName()

getSocketFactory

public java.lang.String getSocketFactory()

setSocketFactory

public void setSocketFactory(java.lang.String valueS)

getSSLImplementation

public java.lang.String getSSLImplementation()

setSSLImplementation

public void setSSLImplementation(java.lang.String valueS)

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)

getServerSoTimeout

public int getServerSoTimeout()

setServerSoTimeout

public void setServerSoTimeout(int i)

getKeystore

public java.lang.String getKeystore()

setKeystore

public void setKeystore(java.lang.String k)

getKeypass

public java.lang.String getKeypass()

setKeypass

public void setKeypass(java.lang.String k)

getKeytype

public java.lang.String getKeytype()

setKeytype

public void setKeytype(java.lang.String k)

getClientauth

public java.lang.String getClientauth()

setClientauth

public void setClientauth(java.lang.String k)

getProtocol

public java.lang.String getProtocol()

setProtocol

public void setProtocol(java.lang.String k)

getProtocols

public java.lang.String getProtocols()

setProtocols

public void setProtocols(java.lang.String k)

getAlgorithm

public java.lang.String getAlgorithm()

setAlgorithm

public void setAlgorithm(java.lang.String k)

getSecure

public boolean getSecure()

setSecure

public void setSecure(boolean b)

getCiphers

public java.lang.String getCiphers()

setCiphers

public void setCiphers(java.lang.String ciphers)

getKeyAlias

public java.lang.String getKeyAlias()

setKeyAlias

public void setKeyAlias(java.lang.String keyAlias)

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)

getReportedname

public java.lang.String getReportedname()

setReportedname

public void setReportedname(java.lang.String reportedName)


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