Fields Summary |
---|
protected static org.apache.juli.logging.Log | log |
protected static org.apache.tomcat.util.res.StringManager | smThe string manager for this package. |
protected Http11ConnectionHandler | cHandler |
protected org.apache.tomcat.util.net.JIoEndpoint | endpoint |
protected ObjectName | tpOname |
protected ObjectName | rgOname |
protected org.apache.tomcat.util.net.ServerSocketFactory | socketFactory |
protected org.apache.tomcat.util.net.SSLImplementation | sslImplementation |
protected HashMap | attributes |
protected org.apache.coyote.Adapter | adapterThe adapter, used to call the connector. |
protected int | processorCacheProcessor cache. |
protected int | socketBuffer |
protected boolean | secureThis field indicates if the protocol is secure from the perspective of
the client (= https is used). |
protected boolean | SSLEnabled |
protected String | socketFactoryNameName of the socket factory. |
protected String | sslImplementationNameName of the SSL implementation. |
protected int | maxKeepAliveRequestsMaximum number of requests which can be performed over a keepalive
connection. The default is the same as for Apache HTTP Server. |
protected int | keepAliveTimeoutThe number of seconds Tomcat will wait for a subsequent request
before closing the connection. The default is the same as for
Apache HTTP Server (15 000 milliseconds). |
protected int | timeoutThis timeout represents the socket timeout which will be used while
the adapter execution is in progress, unless disableUploadTimeout
is set to true. The default is the same as for Apache HTTP Server
(300 000 milliseconds). |
protected int | maxSavePostSizeMaximum size of the post which will be saved when processing certain
requests, such as a POST. |
protected int | maxHttpHeaderSizeMaximum size of the HTTP message header. |
protected boolean | disableUploadTimeoutIf true, the regular socket timeout will be used for the full duration
of the connection. |
protected String | compressionIntegrated compression support. |
protected String | noCompressionUserAgents |
protected String | compressableMimeTypes |
protected int | compressionMinSize |
protected String | restrictedUserAgentsUser agents regular expressions which should be restricted to HTTP/1.0 support. |
protected String | serverServer header. |
protected String | domain |
protected ObjectName | oname |
protected MBeanServer | mserver |
Methods Summary |
---|
public void | destroy()
if (log.isInfoEnabled())
log.info(sm.getString("http11protocol.stop", getName()));
endpoint.destroy();
if (tpOname!=null)
Registry.getRegistry(null, null).unregisterComponent(tpOname);
if (rgOname != null)
Registry.getRegistry(null, null).unregisterComponent(rgOname);
|
public org.apache.coyote.Adapter | getAdapter() return adapter;
|
public java.net.InetAddress | getAddress() return endpoint.getAddress();
|
public java.lang.String | getAlgorithm()
return (String) getAttribute("algorithm");
|
public java.lang.Object | getAttribute(java.lang.String key)
return attributes.get(key);
|
public java.util.Iterator | getAttributeNames()
return attributes.keySet().iterator();
|
public int | getBacklog() return endpoint.getBacklog();
|
public java.lang.String | getCiphers()
return (String) getAttribute("ciphers");
|
public java.lang.String | getClientauth()
return (String) getAttribute("clientauth");
|
public java.lang.String | getCompressableMimeType()
return compressableMimeTypes;
|
public java.lang.String | getCompression()
return compression;
|
public int | getCompressionMinSize()
return compressionMinSize;
|
public boolean | getDisableUploadTimeout()
return disableUploadTimeout;
|
public java.lang.String | getDomain()
return domain;
|
public java.util.concurrent.Executor | getExecutor() return endpoint.getExecutor();
|
public boolean | getKeepAlive()Return the Keep-Alive policy for the connection.
return ((maxKeepAliveRequests != 0) && (maxKeepAliveRequests != 1));
|
public int | getKeepAliveTimeout()
return keepAliveTimeout;
|
public java.lang.String | getKeyAlias()
return (String) getAttribute("keyAlias");
|
public java.lang.String | getKeypass()
return (String) getAttribute("keypass");
|
public java.lang.String | getKeystore()
return (String) getAttribute("keystore");
|
public java.lang.String | getKeytype()
return (String) getAttribute("keystoreType");
|
public int | getMaxHttpHeaderSize()
return maxHttpHeaderSize;
|
public int | getMaxKeepAliveRequests()
return maxKeepAliveRequests;
|
public int | getMaxSavePostSize()
return maxSavePostSize;
|
public int | getMaxThreads() return endpoint.getMaxThreads();
|
public java.lang.String | getName()
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
if (encodedAddr.startsWith("/"))
encodedAddr = encodedAddr.substring(1);
encodedAddr = URLEncoder.encode(encodedAddr) + "-";
}
return ("http-" + encodedAddr + endpoint.getPort());
|
public java.lang.String | getNoCompressionUserAgents()
return noCompressionUserAgents;
|
public javax.management.ObjectName | getObjectName()
return oname;
|
public int | getPort() return endpoint.getPort();
|
public int | getProcessorCache()
return this.processorCache;
|
public java.lang.String | getProperty(java.lang.String name)Get a property
return (String)getAttribute(name);
|
public java.lang.String | getProtocols()
return (String) getAttribute("protocols");
|
public java.lang.String | getRestrictedUserAgents()
return restrictedUserAgents;
|
public java.lang.String | getSSLImplementation()
return sslImplementationName;
|
public boolean | getSecure() return secure;
|
public java.lang.String | getServer() return server;
|
public int | getSoLinger() return endpoint.getSoLinger();
|
public int | getSoTimeout() return endpoint.getSoTimeout();
|
public int | getSocketBuffer()
return socketBuffer;
|
public java.lang.String | getSocketFactory()
return socketFactoryName;
|
public boolean | getTcpNoDelay() return endpoint.getTcpNoDelay();
|
public int | getThreadPriority() return endpoint.getThreadPriority();
|
public int | getTimeout()
return timeout;
|
public void | init()
endpoint.setName(getName());
endpoint.setHandler(cHandler);
// Verify the validity of the configured socket factory
try {
if (isSSLEnabled()) {
sslImplementation =
SSLImplementation.getInstance(sslImplementationName);
socketFactory = sslImplementation.getServerSocketFactory();
endpoint.setServerSocketFactory(socketFactory);
} else if (socketFactoryName != null) {
socketFactory = (ServerSocketFactory) Class.forName(socketFactoryName).newInstance();
endpoint.setServerSocketFactory(socketFactory);
}
} catch (Exception ex) {
log.error(sm.getString("http11protocol.socketfactory.initerror"),
ex);
throw ex;
}
if (socketFactory!=null) {
Iterator<String> attE = attributes.keySet().iterator();
while( attE.hasNext() ) {
String key = attE.next();
Object v=attributes.get(key);
socketFactory.setAttribute(key, v);
}
}
try {
endpoint.init();
} catch (Exception ex) {
log.error(sm.getString("http11protocol.endpoint.initerror"), ex);
throw ex;
}
if (log.isInfoEnabled())
log.info(sm.getString("http11protocol.init", getName()));
|
public boolean | isSSLEnabled()
return SSLEnabled;
|
public void | pause()
try {
endpoint.pause();
} catch (Exception ex) {
log.error(sm.getString("http11protocol.endpoint.pauseerror"), ex);
throw ex;
}
if (log.isInfoEnabled())
log.info(sm.getString("http11protocol.pause", getName()));
|
public void | postDeregister()
|
public void | postRegister(java.lang.Boolean registrationDone)
|
public void | preDeregister()
|
public javax.management.ObjectName | preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)
oname=name;
mserver=server;
domain=name.getDomain();
return name;
|
public void | resume()
try {
endpoint.resume();
} catch (Exception ex) {
log.error(sm.getString("http11protocol.endpoint.resumeerror"), ex);
throw ex;
}
if (log.isInfoEnabled())
log.info(sm.getString("http11protocol.resume", getName()));
|
public void | setAdapter(org.apache.coyote.Adapter adapter) this.adapter = adapter;
|
public void | setAddress(java.net.InetAddress ia) endpoint.setAddress(ia);
|
public void | setAlgorithm(java.lang.String k)
setAttribute("algorithm", k);
|
public void | setAttribute(java.lang.String name, java.lang.Object value)Pass config info
if (log.isTraceEnabled()) {
log.trace(sm.getString("http11protocol.setattribute", name, value));
}
attributes.put(name, value);
|
public void | setBacklog(int backlog) endpoint.setBacklog(backlog);
|
public void | setCiphers(java.lang.String ciphers)
setAttribute("ciphers", ciphers);
|
public void | setClientauth(java.lang.String k)
setAttribute("clientauth", k);
|
public void | setCompressableMimeType(java.lang.String valueS) compressableMimeTypes = valueS;
|
public void | setCompression(java.lang.String valueS) compression = valueS;
|
public void | setCompressionMinSize(int valueI) compressionMinSize = valueI;
|
public void | setDisableUploadTimeout(boolean isDisabled) disableUploadTimeout = isDisabled;
|
public void | setExecutor(java.util.concurrent.Executor executor) endpoint.setExecutor(executor);
|
public void | setKeepAlive(boolean keepAlive)Set the keep-alive policy for this connection.
if (!keepAlive) {
setMaxKeepAliveRequests(1);
}
|
public void | setKeepAliveTimeout(int timeout) keepAliveTimeout = timeout;
|
public void | setKeyAlias(java.lang.String keyAlias)
setAttribute("keyAlias", keyAlias);
|
public void | setKeypass(java.lang.String k)
attributes.put("keypass", k);
//setAttribute("keypass", k);
|
public void | setKeystore(java.lang.String k)
setAttribute("keystore", k);
|
public void | setKeytype(java.lang.String k)
setAttribute("keystoreType", k);
|
public void | setMaxHttpHeaderSize(int valueI) maxHttpHeaderSize = valueI;
|
public void | setMaxKeepAliveRequests(int mkar) maxKeepAliveRequests = mkar;
|
public void | setMaxSavePostSize(int valueI) maxSavePostSize = valueI;
|
public void | setMaxThreads(int maxThreads) endpoint.setMaxThreads(maxThreads);
|
public void | setNoCompressionUserAgents(java.lang.String valueS) noCompressionUserAgents = valueS;
|
public void | setPort(int port) endpoint.setPort(port);
|
public void | setProcessorCache(int processorCache) this.processorCache = processorCache;
|
public void | setProperty(java.lang.String name, java.lang.String value)Set a property.
setAttribute(name, value);
|
public void | setProtocols(java.lang.String k)
setAttribute("protocols", k);
|
public void | setRestrictedUserAgents(java.lang.String valueS) restrictedUserAgents = valueS;
|
public void | setSSLEnabled(boolean SSLEnabled)this.SSLEnabled = SSLEnabled;
|
public void | setSSLImplementation(java.lang.String valueS)
sslImplementationName = valueS;
setSecure(true);
|
public void | setSecure(boolean b) secure = b;
|
public void | setServer(java.lang.String server) this.server = server;
|
public void | setSoLinger(int soLinger) endpoint.setSoLinger(soLinger);
|
public void | setSoTimeout(int soTimeout) endpoint.setSoTimeout(soTimeout);
|
public void | setSocketBuffer(int socketBuffer) this.socketBuffer = socketBuffer;
|
public void | setSocketFactory(java.lang.String valueS) socketFactoryName = valueS;
|
public void | setTcpNoDelay(boolean tcpNoDelay) endpoint.setTcpNoDelay(tcpNoDelay);
|
public void | setThreadPriority(int threadPriority) endpoint.setThreadPriority(threadPriority);
|
public void | setTimeout(int timeout) this.timeout = timeout;
|
public void | start()
if (this.domain != null) {
try {
tpOname = new ObjectName
(domain + ":" + "type=ThreadPool,name=" + getName());
Registry.getRegistry(null, null)
.registerComponent(endpoint, tpOname, null );
} catch (Exception e) {
log.error("Can't register endpoint");
}
rgOname=new ObjectName
(domain + ":type=GlobalRequestProcessor,name=" + getName());
Registry.getRegistry(null, null).registerComponent
( cHandler.global, rgOname, null );
}
try {
endpoint.start();
} catch (Exception ex) {
log.error(sm.getString("http11protocol.endpoint.starterror"), ex);
throw ex;
}
if (log.isInfoEnabled())
log.info(sm.getString("http11protocol.start", getName()));
|