Apache Tomcat 6.0.41

org.apache.coyote.ajp
Class AjpProtocol

java.lang.Object
  extended by org.apache.coyote.AbstractProtocol
      extended by org.apache.coyote.ajp.AjpProtocol
All Implemented Interfaces:
javax.management.MBeanRegistration, ProtocolHandler

public class AjpProtocol
extends AbstractProtocol
implements 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

Nested Class Summary
protected static class AjpProtocol.AjpConnectionHandler
           
 
Field Summary
protected  java.util.Hashtable attributes
          Configuration attributes.
protected  java.lang.String clientCertProvider
          When client certificate information is presented in a form other than instances of X509Certificate it needs to be converted before it can be used and this property controls which JSSE provider is used to perform the conversion.
protected  java.lang.String domain
           
protected  JIoEndpoint endpoint
          Associated java.io endpoint.
protected  int keepAliveTimeout
          The number of seconds Tomcat will wait for a subsequent request before closing the connection.
protected static Log log
           
protected  javax.management.MBeanServer mserver
           
protected  javax.management.ObjectName oname
           
protected  int packetSize
          AJP packet size.
protected  int processorCache
          Processor cache.
protected  java.lang.String requiredSecret
          Required secret.
protected  javax.management.ObjectName rgOname
           
protected static StringManager sm
          The string manager for this package.
protected  boolean tomcatAuthentication
          Should authentication be done in the native webserver layer, or in the Servlet container ?
protected  javax.management.ObjectName tpOname
           
 
Constructor Summary
AjpProtocol()
           
 
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 getClientCertProvider()
           
 java.lang.String getDomain()
           
protected  AbstractEndpoint getEndpoint()
           
 java.util.concurrent.Executor getExecutor()
           
 int getKeepAliveTimeout()
           
 int getMaxThreads()
           
 java.lang.String getName()
           
 javax.management.ObjectName getObjectName()
           
 int getPacketSize()
           
 int getPort()
           
 int getProcessorCache()
           
 int getSoLinger()
           
 int getSoTimeout()
           
 boolean getTcpNoDelay()
           
 int getThreadPriority()
           
 boolean getTomcatAuthentication()
           
 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 backlog)
           
 void setClientCertProvider(java.lang.String s)
           
 void setExecutor(java.util.concurrent.Executor executor)
           
 void setKeepAliveTimeout(int timeout)
           
 void setMaxThreads(int maxThreads)
           
 void setPacketSize(int packetSize)
           
 void setPort(int port)
           
 void setProcessorCache(int processorCache)
           
 void setRequiredSecret(java.lang.String requiredSecret)
           
 void setSoLinger(int soLinger)
           
 void setSoTimeout(int soTimeout)
           
 void setTcpNoDelay(boolean tcpNoDelay)
           
 void setThreadPriority(int threadPriority)
           
 void setTomcatAuthentication(boolean tomcatAuthentication)
           
 void start()
          Start the protocol.
 
Methods inherited from class org.apache.coyote.AbstractProtocol
getMaxHeaderCount, setMaxHeaderCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Log log

sm

protected static StringManager sm
The string manager for this package.


tpOname

protected javax.management.ObjectName tpOname

rgOname

protected javax.management.ObjectName rgOname

endpoint

protected JIoEndpoint endpoint
Associated java.io endpoint.


attributes

protected java.util.Hashtable attributes
Configuration attributes.


processorCache

protected int processorCache
Processor cache.


tomcatAuthentication

protected boolean tomcatAuthentication
Should authentication be done in the native webserver layer, or in the Servlet container ?


requiredSecret

protected java.lang.String requiredSecret
Required secret.


packetSize

protected int packetSize
AJP packet size.


keepAliveTimeout

protected int keepAliveTimeout
The number of seconds Tomcat will wait for a subsequent request before closing the connection.


clientCertProvider

protected java.lang.String clientCertProvider
When client certificate information is presented in a form other than instances of X509Certificate it needs to be converted before it can be used and this property controls which JSSE provider is used to perform the conversion. For example it is used with the AJP connectors, the HTTP APR connector and with the SSLValve. If not specified, the default provider will be used.


domain

protected java.lang.String domain

oname

protected javax.management.ObjectName oname

mserver

protected javax.management.MBeanServer mserver
Constructor Detail

AjpProtocol

public AjpProtocol()
Method Detail

getEndpoint

protected final AbstractEndpoint getEndpoint()
Specified by:
getEndpoint in class AbstractProtocol

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

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

getName

public java.lang.String getName()

getProcessorCache

public int getProcessorCache()

setProcessorCache

public void setProcessorCache(int processorCache)

getExecutor

public java.util.concurrent.Executor getExecutor()

setExecutor

public void setExecutor(java.util.concurrent.Executor executor)

getMaxThreads

public int getMaxThreads()

setMaxThreads

public void setMaxThreads(int maxThreads)

getThreadPriority

public int getThreadPriority()

setThreadPriority

public void setThreadPriority(int threadPriority)

getBacklog

public int getBacklog()

setBacklog

public void setBacklog(int backlog)

getPort

public int getPort()

setPort

public void setPort(int port)

getAddress

public java.net.InetAddress getAddress()

setAddress

public void setAddress(java.net.InetAddress ia)

getTcpNoDelay

public boolean getTcpNoDelay()

setTcpNoDelay

public void setTcpNoDelay(boolean tcpNoDelay)

getSoLinger

public int getSoLinger()

setSoLinger

public void setSoLinger(int soLinger)

getSoTimeout

public int getSoTimeout()

setSoTimeout

public void setSoTimeout(int soTimeout)

getTomcatAuthentication

public boolean getTomcatAuthentication()

setTomcatAuthentication

public void setTomcatAuthentication(boolean tomcatAuthentication)

setRequiredSecret

public void setRequiredSecret(java.lang.String requiredSecret)

getPacketSize

public int getPacketSize()

setPacketSize

public void setPacketSize(int packetSize)

getKeepAliveTimeout

public int getKeepAliveTimeout()

setKeepAliveTimeout

public void setKeepAliveTimeout(int timeout)

getClientCertProvider

public java.lang.String getClientCertProvider()

setClientCertProvider

public void setClientCertProvider(java.lang.String s)

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

Apache Tomcat 6.0.41

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