org.apache.coyote.http11
Class Http11Protocol

java.lang.Object
  extended by org.apache.coyote.http11.Http11Protocol
All Implemented Interfaces:
MBeanRegistration, ProtocolHandler

public class Http11Protocol
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  Adapter adapter
           
protected  Hashtable attributes
           
protected  boolean blocking
           
protected  String compression
          Compression value.
protected  boolean disableUploadTimeout
           
protected  String domain
           
protected  PoolTcpEndpoint ep
           
protected static com.sun.org.apache.commons.logging.Log log
           
protected  int maxHttpHeaderSize
           
protected  int maxPostSize
           
protected  MBeanServer mserver
           
protected  ObjectName oname
           
protected  int requestBufferSize
          The input request buffer size.
protected  boolean secure
           
protected  String selectorThreadImpl
          The SelectorThread implementation class.
protected static StringManager sm
          The string manager for this package.
protected  int socketCloseDelay
           
protected  ServerSocketFactory socketFactory
           
protected  String socketFactoryName
           
protected  SSLImplementation sslImplementation
           
protected  String sslImplementationName
           
static int THREAD_DATA_OBJECT_NAME
           
static int THREAD_DATA_PROCESSOR
           
protected  int timeout
           
protected  ThreadPool tp
           
 
Constructor Summary
Http11Protocol()
           
Http11Protocol(boolean secure, boolean blocking, String selectorThreadImpl)
           
 
Method Summary
protected  void create()
           
 void destroy()
           
 Adapter getAdapter()
           
 InetAddress getAddress()
           
 String getAlgorithm()
           
 Object getAttribute(String key)
           
 int getBacklog()
           
 boolean getBlocking()
           
 int getBufferSize()
          Return the request input buffer size
 String getCiphers()
           
 String getClientauth()
           
 String getCompression()
           
 boolean getDisableUploadTimeout()
           
 String getDomain()
           
 String getKeyAlias()
           
 String getKeypass()
           
 String getKeystore()
           
 String getKeytype()
           
 int getMaxHttpHeaderSize()
           
 int getMaxKeepAliveRequests()
           
 int getMaxPostSize()
           
 int getMaxSpareThreads()
           
 int getMaxThreads()
           
 int getMinSpareThreads()
           
 ObjectName getObjectName()
           
 boolean getPools()
           
 int getPort()
           
 String getProperty(String name)
          Get a property
 String getProtocol()
           
 String getProtocols()
           
 String getReportedname()
           
 boolean getSecure()
           
 int getServerSoTimeout()
           
 int getSocketCloseDelay()
           
 String getSocketFactory()
           
 int getSoLinger()
           
 int getSoTimeout()
           
 String getSSLImplementation()
           
 boolean getTcpNoDelay()
           
 int getTimeout()
           
 void init()
          Start the protocol
 void postDeregister()
           
 void postRegister(Boolean registrationDone)
           
 void preDeregister()
           
 ObjectName preRegister(MBeanServer server, ObjectName name)
           
 void setAdapter(Adapter adapter)
          The adapter, used to call the connector
 void setAddress(InetAddress ia)
           
 void setAlgorithm(String k)
           
 void setAttribute(String name, Object value)
          Pass config info
 void setBacklog(int i)
           
 void setBlocking(boolean b)
           
 void setBufferSize(int requestBufferSize)
          Set the request input buffer size
 void setCiphers(String ciphers)
           
 void setClientauth(String k)
           
 void setCompression(String valueS)
           
 void setDisableUploadTimeout(boolean isDisabled)
           
 void setKeyAlias(String keyAlias)
           
 void setKeypass(String k)
           
 void setKeystore(String k)
           
 void setKeytype(String k)
           
 void setMaxHttpHeaderSize(int valueI)
           
 void setMaxKeepAliveRequests(int mkar)
          Set the maximum number of Keep-Alive requests that we will honor.
 void setMaxPostSize(int valueI)
           
 void setMaxSpareThreads(int maxThreads)
           
 void setMaxThreads(int maxThreads)
           
 void setMinSpareThreads(int minSpareThreads)
           
 void setPools(boolean t)
           
 void setPort(int port)
           
 void setProperty(String name, String value)
          Set a property.
 void setProtocol(String k)
           
 void setProtocols(String k)
           
 void setReportedname(String reportedName)
           
 void setSecure(boolean b)
           
 void setServerSoTimeout(int i)
           
 void setSocketCloseDelay(int d)
           
 void setSocketFactory(String valueS)
           
 void setSoLinger(int i)
           
 void setSoTimeout(int i)
           
 void setSSLImplementation(String valueS)
           
 void setTcpNoDelay(boolean b)
           
 void setTimeout(int timeouts)
           
 void setTruststore(String truststore)
           
 void setTruststoreType(String truststoreType)
           
 void start()
          Start the protocol.
protected static ServerSocketFactory string2SocketFactory(String val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blocking

protected boolean blocking

selectorThreadImpl

protected String selectorThreadImpl
The SelectorThread implementation class. Not used when Coyote is used.


sm

protected static final 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 Hashtable attributes

socketFactoryName

protected String socketFactoryName

sslImplementationName

protected String sslImplementationName

timeout

protected int timeout

maxPostSize

protected int maxPostSize

maxHttpHeaderSize

protected int maxHttpHeaderSize

socketCloseDelay

protected int socketCloseDelay

disableUploadTimeout

protected boolean disableUploadTimeout

adapter

protected Adapter adapter

requestBufferSize

protected int requestBufferSize
The input request buffer size.


compression

protected String compression
Compression value.


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 final com.sun.org.apache.commons.logging.Log log

domain

protected String domain

oname

protected ObjectName oname

mserver

protected MBeanServer mserver
Constructor Detail

Http11Protocol

public Http11Protocol()

Http11Protocol

public Http11Protocol(boolean secure,
                      boolean blocking,
                      String selectorThreadImpl)
Method Detail

create

protected void create()

getMaxHttpHeaderSize

public int getMaxHttpHeaderSize()

setMaxHttpHeaderSize

public void setMaxHttpHeaderSize(int valueI)

setAttribute

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

Specified by:
setAttribute in interface ProtocolHandler

getAttribute

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

setProperty

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


getProperty

public String getProperty(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 Exception
Start the protocol

Specified by:
init in interface ProtocolHandler
Throws:
Exception

start

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

Specified by:
start in interface ProtocolHandler
Throws:
Exception

destroy

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

getPools

public boolean getPools()

setPools

public void setPools(boolean t)

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)

getBacklog

public int getBacklog()

setBacklog

public void setBacklog(int i)

getPort

public int getPort()

setPort

public void setPort(int port)

getAddress

public InetAddress getAddress()

setAddress

public void setAddress(InetAddress ia)

getSocketFactory

public String getSocketFactory()

setSocketFactory

public void setSocketFactory(String valueS)

getSSLImplementation

public String getSSLImplementation()

setSSLImplementation

public void setSSLImplementation(String valueS)

getTcpNoDelay

public boolean getTcpNoDelay()

setTcpNoDelay

public void setTcpNoDelay(boolean b)

getDisableUploadTimeout

public boolean getDisableUploadTimeout()

setDisableUploadTimeout

public void setDisableUploadTimeout(boolean isDisabled)

getCompression

public String getCompression()

setCompression

public void setCompression(String valueS)

getMaxPostSize

public int getMaxPostSize()

setMaxPostSize

public void setMaxPostSize(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 String getKeystore()

setKeystore

public void setKeystore(String k)

getKeypass

public String getKeypass()

setKeypass

public void setKeypass(String k)

getKeytype

public String getKeytype()

setKeytype

public void setKeytype(String k)

setTruststore

public void setTruststore(String truststore)

setTruststoreType

public void setTruststoreType(String truststoreType)

getClientauth

public String getClientauth()

setClientauth

public void setClientauth(String k)

getProtocol

public String getProtocol()

setProtocol

public void setProtocol(String k)

getProtocols

public String getProtocols()

setProtocols

public void setProtocols(String k)

getAlgorithm

public String getAlgorithm()

setAlgorithm

public void setAlgorithm(String k)

getSecure

public boolean getSecure()

setSecure

public void setSecure(boolean b)

getBlocking

public boolean getBlocking()

setBlocking

public void setBlocking(boolean b)

getCiphers

public String getCiphers()

setCiphers

public void setCiphers(String ciphers)

getKeyAlias

public String getKeyAlias()

setKeyAlias

public void setKeyAlias(String keyAlias)

getMaxKeepAliveRequests

public int getMaxKeepAliveRequests()

setMaxKeepAliveRequests

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


getSocketCloseDelay

public int getSocketCloseDelay()

setSocketCloseDelay

public void setSocketCloseDelay(int d)

string2SocketFactory

protected static ServerSocketFactory string2SocketFactory(String val)
                                                   throws ClassNotFoundException,
                                                          IllegalAccessException,
                                                          InstantiationException
Throws:
ClassNotFoundException
IllegalAccessException
InstantiationException

getTimeout

public int getTimeout()

setTimeout

public void setTimeout(int timeouts)

getReportedname

public String getReportedname()

setReportedname

public void setReportedname(String reportedName)

getObjectName

public ObjectName getObjectName()

getDomain

public String getDomain()

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
                       throws Exception
Specified by:
preRegister in interface MBeanRegistration
Throws:
Exception

postRegister

public void postRegister(Boolean registrationDone)
Specified by:
postRegister in interface MBeanRegistration

preDeregister

public void preDeregister()
                   throws Exception
Specified by:
preDeregister in interface MBeanRegistration
Throws:
Exception

postDeregister

public void postDeregister()
Specified by:
postDeregister in interface MBeanRegistration

setBufferSize

public void setBufferSize(int requestBufferSize)
Set the request input buffer size


getBufferSize

public int getBufferSize()
Return the request input buffer size



Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.