org.apache.coyote.ajp
Class AjpAprProtocol

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

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

Nested Class Summary
protected static class AjpAprProtocol.AjpConnectionHandler
           
 
Field Summary
protected  java.util.Hashtable attributes
          Configuration attributes.
protected  java.lang.String domain
           
protected  AprEndpoint endpoint
          Associated APR endpoint.
protected static org.jboss.logging.Logger 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
AjpAprProtocol()
           
 
Method Summary
 void destroy()
           
 Adapter getAdapter()
           
 java.net.InetAddress getAddress()
           
 java.lang.Object getAttribute(java.lang.String key)
           
 java.util.Iterator getAttributeNames()
           
 int getBacklog()
           
 boolean getDeferAccept()
           
 java.lang.String getDomain()
           
 java.util.concurrent.Executor getExecutor()
           
 int getKeepAliveTimeout()
          The number of seconds Tomcat will wait for a subsequent request before closing the connection.
 int getMaxThreads()
           
 java.lang.String getName()
           
 javax.management.ObjectName getObjectName()
           
 int getPacketSize()
           
 int getPollerSize()
           
 int getPollTime()
           
 int getPort()
           
 int getProcessorCache()
           
 boolean getReverseConnection()
           
 int getSoLinger()
           
 int getSoTimeout()
           
 boolean getTcpNoDelay()
           
 int getThreadPriority()
           
 boolean getTomcatAuthentication()
           
 boolean getUseSendfile()
           
 boolean hasIoEvents()
           
 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 setDeferAccept(boolean deferAccept)
           
 void setExecutor(java.util.concurrent.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(java.lang.String requiredSecret)
           
 void setReverseConnection(boolean reverseConnection)
           
 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

log

protected static org.jboss.logging.Logger 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 AprEndpoint endpoint
Associated APR 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.


domain

protected java.lang.String domain

oname

protected javax.management.ObjectName oname

mserver

protected javax.management.MBeanServer mserver
Constructor Detail

AjpAprProtocol

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

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

hasIoEvents

public boolean hasIoEvents()
Specified by:
hasIoEvents 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)

getReverseConnection

public boolean getReverseConnection()

setReverseConnection

public void setReverseConnection(boolean reverseConnection)

getDeferAccept

public boolean getDeferAccept()

setDeferAccept

public void setDeferAccept(boolean deferAccept)

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()
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 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-2009 Apache Software Foundation. All Rights Reserved.