public abstract class AbstractProtocol<S> extends java.lang.Object implements ProtocolHandler, javax.management.MBeanRegistration
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractProtocol.AbstractConnectionHandler<S,P extends Processor<S>> |
protected static class |
AbstractProtocol.RecycledProcessors<P extends Processor<S>,S> |
| Modifier and Type | Field and Description |
|---|---|
protected Adapter |
adapter
The adapter provides the link between the ProtocolHandler and the
connector.
|
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 AbstractEndpoint<S> |
endpoint
Endpoint that provides low-level network I/O - must be matched to the
ProtocolHandler implementation (ProtocolHandler using BIO, requires BIO
Endpoint etc.).
|
protected javax.management.MBeanServer |
mserver |
protected javax.management.ObjectName |
oname |
protected int |
processorCache
The maximum number of idle processors that will be retained in the cache
and re-used with a subsequent request.
|
protected javax.management.ObjectName |
rgOname
Name of MBean for the Global Request Processor.
|
protected static StringManager |
sm
The string manager for this package.
|
protected javax.management.ObjectName |
tpOname
Name of MBean for the ThreadPool.
|
| Constructor and Description |
|---|
AbstractProtocol() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy the protocol (optional).
|
Adapter |
getAdapter() |
java.net.InetAddress |
getAddress() |
int |
getBacklog() |
java.lang.String |
getClientCertProvider() |
long |
getConnectionCount() |
int |
getConnectionTimeout() |
java.lang.String |
getDomain() |
java.util.concurrent.Executor |
getExecutor()
The executor, provide access to the underlying thread pool.
|
protected abstract AbstractEndpoint.Handler |
getHandler()
Obtain the handler associated with the underlying Endpoint
|
int |
getKeepAliveTimeout() |
int |
getLocalPort() |
protected abstract Log |
getLog()
Concrete implementations need to provide access to their logger to be
used by the abstract classes.
|
int |
getMaxConnections() |
int |
getMaxCookieCount() |
int |
getMaxHeaderCount() |
int |
getMaxThreads() |
int |
getMinSpareThreads() |
java.lang.String |
getName()
The name will be prefix-address-port if address is non-null and
prefix-port if the address is null.
|
int |
getNameIndex() |
protected abstract java.lang.String |
getNamePrefix()
Obtain the prefix to be used when construction a name for this protocol
handler.
|
javax.management.ObjectName |
getObjectName() |
int |
getPort() |
int |
getProcessorCache() |
java.lang.String |
getProperty(java.lang.String name)
Generic property getter used by the digester.
|
protected abstract java.lang.String |
getProtocolName()
Obtain the name of the protocol, (Http, Ajp, etc.).
|
int |
getSoLinger() |
int |
getSoTimeout() |
boolean |
getTcpNoDelay() |
int |
getThreadPriority() |
void |
init()
Initialise the protocol.
|
boolean |
isAprRequired()
Requires APR/native library
|
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 |
setBacklog(int backlog) |
void |
setClientCertProvider(java.lang.String s) |
void |
setConnectionTimeout(int timeout) |
void |
setExecutor(java.util.concurrent.Executor executor) |
void |
setKeepAliveTimeout(int keepAliveTimeout) |
void |
setMaxConnections(int maxConnections) |
void |
setMaxCookieCount(int maxCookieCount) |
void |
setMaxHeaderCount(int maxHeaderCount) |
void |
setMaxThreads(int maxThreads) |
void |
setMinSpareThreads(int minSpareThreads) |
void |
setPort(int port) |
void |
setProcessorCache(int processorCache) |
boolean |
setProperty(java.lang.String name,
java.lang.String value)
Generic property setter used by the digester.
|
void |
setSoLinger(int soLinger) |
void |
setSoTimeout(int timeout) |
void |
setTcpNoDelay(boolean tcpNoDelay) |
void |
setThreadPriority(int threadPriority) |
void |
start()
Start the protocol.
|
void |
stop()
Stop the protocol.
|
protected static final StringManager sm
protected javax.management.ObjectName rgOname
protected javax.management.ObjectName tpOname
protected AbstractEndpoint<S> endpoint
protected Adapter adapter
protected int processorCache
getMaxConnections() although it will
usually be closer to getMaxThreads().protected java.lang.String clientCertProvider
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.protected java.lang.String domain
protected javax.management.ObjectName oname
protected javax.management.MBeanServer mserver
public boolean setProperty(java.lang.String name,
java.lang.String value)
public java.lang.String getProperty(java.lang.String name)
public void setAdapter(Adapter adapter)
ProtocolHandlersetAdapter in interface ProtocolHandlerpublic Adapter getAdapter()
getAdapter in interface ProtocolHandlerpublic int getProcessorCache()
public void setProcessorCache(int processorCache)
public java.lang.String getClientCertProvider()
public void setClientCertProvider(java.lang.String s)
public boolean isAprRequired()
ProtocolHandlerisAprRequired in interface ProtocolHandlerpublic int getMaxCookieCount()
public void setMaxCookieCount(int maxCookieCount)
public java.util.concurrent.Executor getExecutor()
ProtocolHandlergetExecutor in interface ProtocolHandlerpublic void setExecutor(java.util.concurrent.Executor executor)
public int getMaxThreads()
public void setMaxThreads(int maxThreads)
public int getMaxConnections()
public void setMaxConnections(int maxConnections)
public int getMinSpareThreads()
public void setMinSpareThreads(int minSpareThreads)
public int getThreadPriority()
public void setThreadPriority(int threadPriority)
public int getBacklog()
public void setBacklog(int backlog)
public boolean getTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
public int getSoLinger()
public void setSoLinger(int soLinger)
public int getKeepAliveTimeout()
public void setKeepAliveTimeout(int keepAliveTimeout)
public java.net.InetAddress getAddress()
public void setAddress(java.net.InetAddress ia)
public int getPort()
public void setPort(int port)
public int getLocalPort()
public int getConnectionTimeout()
public void setConnectionTimeout(int timeout)
public int getSoTimeout()
public void setSoTimeout(int timeout)
public int getMaxHeaderCount()
public void setMaxHeaderCount(int maxHeaderCount)
public long getConnectionCount()
public int getNameIndex()
public java.lang.String getName()
protected abstract Log getLog()
protected abstract java.lang.String getNamePrefix()
protected abstract java.lang.String getProtocolName()
protected abstract AbstractEndpoint.Handler getHandler()
public javax.management.ObjectName getObjectName()
public java.lang.String getDomain()
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws java.lang.Exception
preRegister in interface javax.management.MBeanRegistrationjava.lang.Exceptionpublic void postRegister(java.lang.Boolean registrationDone)
postRegister in interface javax.management.MBeanRegistrationpublic void preDeregister()
throws java.lang.Exception
preDeregister in interface javax.management.MBeanRegistrationjava.lang.Exceptionpublic void postDeregister()
postDeregister in interface javax.management.MBeanRegistrationpublic void init()
throws java.lang.Exception
ProtocolHandlerinit in interface ProtocolHandlerjava.lang.Exceptionpublic void start()
throws java.lang.Exception
ProtocolHandlerstart in interface ProtocolHandlerjava.lang.Exceptionpublic void pause()
throws java.lang.Exception
ProtocolHandlerpause in interface ProtocolHandlerjava.lang.Exceptionpublic void resume()
throws java.lang.Exception
ProtocolHandlerresume in interface ProtocolHandlerjava.lang.Exceptionpublic void stop()
throws java.lang.Exception
ProtocolHandlerstop in interface ProtocolHandlerjava.lang.Exceptionpublic void destroy()
ProtocolHandlerdestroy in interface ProtocolHandlerCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.