Apache Tomcat 7.0.2

org.apache.coyote.ajp
Class AjpAprProtocol

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

public class AjpAprProtocol
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

Nested Class Summary
protected static class AjpAprProtocol.AjpConnectionHandler
           
 
Field Summary
protected  Hashtable<String,Object> attributes
          Configuration attributes.
protected  String domain
           
protected  AprEndpoint endpoint
          Associated APR endpoint.
protected  MBeanServer mserver
           
protected  ObjectName oname
           
protected  int packetSize
          AJP packet size.
protected  int processorCache
          Processor cache.
protected  String requiredSecret
          Required secret.
protected  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  ObjectName tpOname
           
 
Constructor Summary
AjpAprProtocol()
           
 
Method Summary
 void destroy()
          Destroy the protocol (optional).
 Adapter getAdapter()
           
 InetAddress getAddress()
           
 Object getAttribute(String key)
           
 Iterator<String> getAttributeNames()
           
 int getBacklog()
           
 String getDomain()
           
 Executor getExecutor()
          The executor, provide access to the underlying thread pool.
 int getKeepAliveTimeout()
          The number of seconds Tomcat will wait for a subsequent request before closing the connection.
 int getMaxThreads()
           
 String getName()
           
 ObjectName getObjectName()
           
 int getPacketSize()
           
 int getPollerSize()
           
 int getPollTime()
           
 int getPort()
           
 int getProcessorCache()
           
 int getSoLinger()
           
 int getSoTimeout()
           
 boolean getTcpNoDelay()
           
 int getThreadPriority()
           
 boolean getTomcatAuthentication()
           
 boolean getUseSendfile()
           
 void init()
          Start the protocol
 void pause()
          Pause the protocol (optional).
 void postDeregister()
           
 void postRegister(Boolean registrationDone)
           
 void preDeregister()
           
 ObjectName preRegister(MBeanServer server, ObjectName name)
           
 void resume()
          Resume the protocol (optional).
 void setAdapter(Adapter adapter)
          The adapter, used to call the connector
 void setAddress(InetAddress ia)
           
 void setAttribute(String name, Object value)
          Pass config info
 void setBacklog(int backlog)
           
 void setExecutor(Executor executor)
           
 void setKeepAliveTimeout(int timeout)
           
 void setMaxThreads(int maxThreads)
           
 void setPacketSize(int packetSize)
           
 void setPollerSize(int pollerSize)
           
 void setPollTime(int pollTime)
           
 void setPort(int port)
           
 void setProcessorCache(int processorCache)
           
 void setRequiredSecret(String requiredSecret)
           
 void setSoLinger(int soLinger)
           
 void setSoTimeout(int soTimeout)
           
 void setTcpNoDelay(boolean tcpNoDelay)
           
 void setThreadPriority(int threadPriority)
           
 void setTomcatAuthentication(boolean tomcatAuthentication)
           
 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 final StringManager sm
The string manager for this package.


tpOname

protected ObjectName tpOname

rgOname

protected ObjectName rgOname

endpoint

protected AprEndpoint endpoint
Associated APR endpoint.


attributes

protected Hashtable<String,Object> 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 String requiredSecret
Required secret.


packetSize

protected int packetSize
AJP packet size.


domain

protected String domain

oname

protected ObjectName oname

mserver

protected MBeanServer mserver
Constructor Detail

AjpAprProtocol

public AjpAprProtocol()
Method Detail

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

getAttributeNames

public Iterator<String> 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 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

pause

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

Specified by:
pause in interface ProtocolHandler
Throws:
Exception

resume

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

Specified by:
resume in interface ProtocolHandler
Throws:
Exception

destroy

public void destroy()
             throws Exception
Description copied from interface: ProtocolHandler
Destroy the protocol (optional).

Specified by:
destroy in interface ProtocolHandler
Throws:
Exception

getName

public String getName()

getProcessorCache

public int getProcessorCache()

setProcessorCache

public void setProcessorCache(int processorCache)

getExecutor

public Executor getExecutor()
Description copied from interface: ProtocolHandler
The executor, provide access to the underlying thread pool.

Specified by:
getExecutor in interface ProtocolHandler

setExecutor

public void setExecutor(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 InetAddress getAddress()

setAddress

public void setAddress(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(String requiredSecret)

getPacketSize

public int getPacketSize()

setPacketSize

public void setPacketSize(int packetSize)

getKeepAliveTimeout

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


setKeepAliveTimeout

public void setKeepAliveTimeout(int timeout)

getUseSendfile

public boolean getUseSendfile()

setUseSendfile

public void setUseSendfile(boolean useSendfile)

getPollTime

public int getPollTime()

setPollTime

public void setPollTime(int pollTime)

setPollerSize

public void setPollerSize(int pollerSize)

getPollerSize

public int getPollerSize()

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

Apache Tomcat 7.0.2

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