S - The type of socket used by the implementationpublic abstract class AbstractAjpProtocol<S> extends AbstractProtocol<S>
ProtocolHandler. All of the implementations that ship with
Tomcat are implemented this way.AbstractProtocol.ConnectionHandler<S>, AbstractProtocol.RecycledProcessors| Modifier and Type | Field and Description |
|---|---|
protected static StringManager |
sm
The string manager for this package.
|
adapter, domain, mserver, oname, processorCache, rgOname| Constructor and Description |
|---|
AbstractAjpProtocol(AbstractEndpoint<S,?> endpoint) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSslHostConfig(SSLHostConfig sslHostConfig)
Add a new SSL configuration for a virtual host.
|
void |
addUpgradeProtocol(UpgradeProtocol upgradeProtocol)
Add a new protocol for used by HTTP/1.1 upgrade or ALPN.
|
protected Processor |
createProcessor()
Create and configure a new Processor instance for the current protocol
implementation.
|
protected Processor |
createUpgradeProcessor(SocketWrapperBase<?> socket,
UpgradeToken upgradeToken) |
SSLHostConfig[] |
findSslHostConfigs()
Find all configured SSL virtual host configurations which will be used
by SNI.
|
UpgradeProtocol[] |
findUpgradeProtocols()
Return all configured upgrade protocols.
|
boolean |
getAjpFlush() |
String |
getAllowedRequestAttributesPattern() |
protected Pattern |
getAllowedRequestAttributesPatternInternal() |
int |
getDesiredBufferSize()
Some protocols, like AJP, have a packet length that
shouldn't be exceeded, and this can be used to adjust the buffering
used by the application layer.
|
protected AbstractEndpoint<S,?> |
getEndpoint()
Overridden to make getter accessible to other classes in this package.
|
protected UpgradeProtocol |
getNegotiatedProtocol(String name)
Find a suitable handler for the protocol negotiated
at the network layer.
|
int |
getPacketSize() |
protected String |
getProtocolName()
Obtain the name of the protocol, (Http, Ajp, etc.).
|
protected String |
getRequiredSecret()
Deprecated.
Replaced by
getSecret().
Will be removed in Tomcat 11 onwards |
protected String |
getSecret() |
boolean |
getSecretRequired() |
boolean |
getTomcatAuthentication()
Should authentication be done in the native web server layer,
or in the Servlet container ?
|
boolean |
getTomcatAuthorization()
Should authentication be done in the native web server layer and
authorization in the Servlet container?
|
protected UpgradeProtocol |
getUpgradeProtocol(String name)
Find a suitable handler for the protocol upgraded name specified.
|
void |
setAjpFlush(boolean ajpFlush)
Configure whether to aend an AJP flush packet when flushing.
|
void |
setAllowedRequestAttributesPattern(String allowedRequestAttributesPattern) |
void |
setPacketSize(int packetSize) |
void |
setRequiredSecret(String requiredSecret)
Deprecated.
Replaced by
setSecret(String).
Will be removed in Tomcat 11 onwards |
void |
setSecret(String secret)
Set the secret that must be included with every request.
|
void |
setSecretRequired(boolean secretRequired) |
void |
setTomcatAuthentication(boolean tomcatAuthentication) |
void |
setTomcatAuthorization(boolean tomcatAuthorization) |
void |
start()
Start the protocol.
|
addWaitingProcessor, closeServerSocketGraceful, destroy, getAcceptCount, getAcceptorThreadCount, getAcceptorThreadPriority, getAdapter, getAddress, getClientCertProvider, getConnectionCount, getConnectionLinger, getConnectionTimeout, getDomain, getExecutor, getHandler, getKeepAliveTimeout, getLocalPort, getLog, getMaxConnections, getMaxHeaderCount, getMaxThreads, getMinSpareThreads, getName, getNameIndex, getNamePrefix, getObjectName, getPort, getPortOffset, getPortWithOffset, getProcessorCache, getProperty, getTcpNoDelay, getThreadPriority, getUtilityExecutor, init, isAprRequired, isPaused, isSendfileSupported, pause, postDeregister, postRegister, preDeregister, preRegister, removeWaitingProcessor, resume, setAcceptCount, setAcceptorThreadCount, setAcceptorThreadPriority, setAdapter, setAddress, setClientCertProvider, setConnectionLinger, setConnectionTimeout, setExecutor, setHandler, setKeepAliveTimeout, setMaxConnections, setMaxHeaderCount, setMaxThreads, setMinSpareThreads, setPort, setPortOffset, setProcessorCache, setProperty, setTcpNoDelay, setThreadPriority, setUtilityExecutor, startAsyncTimeout, stop, stopAsyncTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateprotected static final StringManager sm
public AbstractAjpProtocol(AbstractEndpoint<S,?> endpoint)
protected String getProtocolName()
AbstractProtocolgetProtocolName in class AbstractProtocol<S>protected AbstractEndpoint<S,?> getEndpoint()
getEndpoint in class AbstractProtocol<S>protected UpgradeProtocol getNegotiatedProtocol(String name)
getNegotiatedProtocol in class AbstractProtocol<S>name - The name of the requested negotiated protocol.UpgradeProtocol.getAlpnName() matches
the requested protocolprotected UpgradeProtocol getUpgradeProtocol(String name)
getUpgradeProtocol in class AbstractProtocol<S>name - The name of the requested negotiated protocol.UpgradeProtocol.getAlpnName() matches
the requested protocolpublic boolean getAjpFlush()
public void setAjpFlush(boolean ajpFlush)
ajpFlush - The new flush settingpublic boolean getTomcatAuthentication()
true if authentication should be performed by Tomcat,
otherwise falsepublic void setTomcatAuthentication(boolean tomcatAuthentication)
public boolean getTomcatAuthorization()
true if authorization should be performed by Tomcat,
otherwise falsepublic void setTomcatAuthorization(boolean tomcatAuthorization)
public void setSecret(String secret)
secret - The required secretprotected String getSecret()
@Deprecated public void setRequiredSecret(String requiredSecret)
setSecret(String).
Will be removed in Tomcat 11 onwardsrequiredSecret - The required secret@Deprecated protected String getRequiredSecret()
getSecret().
Will be removed in Tomcat 11 onwardspublic void setSecretRequired(boolean secretRequired)
public boolean getSecretRequired()
public void setAllowedRequestAttributesPattern(String allowedRequestAttributesPattern)
public String getAllowedRequestAttributesPattern()
protected Pattern getAllowedRequestAttributesPatternInternal()
public int getPacketSize()
public void setPacketSize(int packetSize)
public int getDesiredBufferSize()
ProtocolHandlerpublic void addSslHostConfig(SSLHostConfig sslHostConfig)
ProtocolHandlersslHostConfig - the configurationpublic SSLHostConfig[] findSslHostConfigs()
ProtocolHandlerpublic void addUpgradeProtocol(UpgradeProtocol upgradeProtocol)
ProtocolHandlerupgradeProtocol - the protocolpublic UpgradeProtocol[] findUpgradeProtocols()
ProtocolHandlerprotected Processor createProcessor()
AbstractProtocolcreateProcessor in class AbstractProtocol<S>protected Processor createUpgradeProcessor(SocketWrapperBase<?> socket, UpgradeToken upgradeToken)
createUpgradeProcessor in class AbstractProtocol<S>public void start()
throws Exception
ProtocolHandlerstart in interface ProtocolHandlerstart in class AbstractProtocol<S>Exception - If the protocol handler fails to startCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.