org.apache.coyote.ajp
Class AjpAprProtocol

java.lang.Object
  extended byorg.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 ep
          Associated APR endpoint.
protected static org.apache.commons.logging.Log log
           
protected  javax.management.MBeanServer mserver
           
protected  javax.management.ObjectName oname
           
protected  int packetSize
          AJP packet size.
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()
           
 java.lang.String getDomain()
           
 int getFirstReadTimeout()
           
 int getMaxThreads()
           
 java.lang.String getName()
           
 javax.management.ObjectName getObjectName()
           
 int getPacketSize()
           
 int getPollerSize()
           
 int getPollTime()
           
 int getPort()
           
 java.lang.String getProperty(java.lang.String name)
          Get a property
 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(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 i)
           
 void setFirstReadTimeout(int i)
           
 void setMaxThreads(int maxThreads)
           
 void setPacketSize(int packetSize)
           
 void setPollerSize(int i)
           
 void setPollTime(int i)
           
 void setPort(int port)
           
 void setProperty(java.lang.String name, java.lang.String value)
          Set a property.
 void setRequiredSecret(java.lang.String requiredSecret)
           
 void setSoLinger(int i)
           
 void setSoTimeout(int i)
           
 void setTcpNoDelay(boolean b)
           
 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.apache.commons.logging.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

ep

protected AprEndpoint ep
Associated APR endpoint.


attributes

protected java.util.Hashtable attributes
Configuration attributes.


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

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

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)

setThreadPriority

public void setThreadPriority(int threadPriority)

getThreadPriority

public int getThreadPriority()

getBacklog

public int getBacklog()

setBacklog

public void setBacklog(int i)

getPort

public int getPort()

setPort

public void setPort(int port)

getUseSendfile

public boolean getUseSendfile()

setUseSendfile

public void setUseSendfile(boolean useSendfile)

getAddress

public java.net.InetAddress getAddress()

setAddress

public void setAddress(java.net.InetAddress ia)

getName

public java.lang.String getName()

getTcpNoDelay

public boolean getTcpNoDelay()

setTcpNoDelay

public void setTcpNoDelay(boolean b)

getTomcatAuthentication

public boolean getTomcatAuthentication()

setTomcatAuthentication

public void setTomcatAuthentication(boolean tomcatAuthentication)

getFirstReadTimeout

public int getFirstReadTimeout()

setFirstReadTimeout

public void setFirstReadTimeout(int i)

getPollTime

public int getPollTime()

setPollTime

public void setPollTime(int i)

setPollerSize

public void setPollerSize(int i)

getPollerSize

public int getPollerSize()

getSoLinger

public int getSoLinger()

setSoLinger

public void setSoLinger(int i)

getSoTimeout

public int getSoTimeout()

setSoTimeout

public void setSoTimeout(int i)

setRequiredSecret

public void setRequiredSecret(java.lang.String requiredSecret)

getPacketSize

public int getPacketSize()

setPacketSize

public void setPacketSize(int packetSize)

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-2012 Apache Software Foundation. All Rights Reserved.