| Method from org.apache.coyote.http11.Http11Protocol Detail: |
public void destroy() throws Exception {
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 Adapter getAdapter() {
return adapter;
}
|
public InetAddress getAddress() {
return endpoint.getAddress();
}
|
public String getAlgorithm() {
return (String) getAttribute("algorithm");
}
|
public Object getAttribute(String key) {
return attributes.get(key);
}
|
public Iterator getAttributeNames() {
return attributes.keySet().iterator();
}
|
public int getBacklog() {
return endpoint.getBacklog();
}
|
public String getCiphers() {
return (String) getAttribute("ciphers");
}
|
public String getClientauth() {
return (String) getAttribute("clientauth");
}
|
public String getCompressableMimeType() {
return compressableMimeTypes;
}
|
public String getCompression() {
return compression;
}
|
public int getCompressionMinSize() {
return compressionMinSize;
}
|
public boolean getDisableUploadTimeout() {
return disableUploadTimeout;
}
|
public String getDomain() {
return domain;
}
|
public Executor getExecutor() {
return endpoint.getExecutor();
}
|
public boolean getKeepAlive() {
return ((maxKeepAliveRequests != 0) && (maxKeepAliveRequests != 1));
}
Return the Keep-Alive policy for the connection. |
public int getKeepAliveTimeout() {
return keepAliveTimeout;
}
|
public String getKeyAlias() {
return (String) getAttribute("keyAlias");
}
|
public String getKeypass() {
return (String) getAttribute("keypass");
}
|
public String getKeystore() {
return (String) getAttribute("keystore");
}
|
public 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 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 String getNoCompressionUserAgents() {
return noCompressionUserAgents;
}
|
public ObjectName getObjectName() {
return oname;
}
|
public int getPort() {
return endpoint.getPort();
}
|
public int getProcessorCache() {
return this.processorCache;
}
|
public String getProperty(String name) {
return (String)getAttribute(name);
}
|
public String getProtocols() {
return (String) getAttribute("protocols");
}
|
public String getRestrictedUserAgents() {
return restrictedUserAgents;
}
|
public String getSSLImplementation() {
return sslImplementationName;
}
|
public boolean getSecure() {
return secure;
}
|
public String getServer() {
return server;
}
|
public int getSoLinger() {
return endpoint.getSoLinger();
}
|
public int getSoTimeout() {
return endpoint.getSoTimeout();
}
|
public int getSocketBuffer() {
return socketBuffer;
}
|
public String getSocketFactory() {
return socketFactoryName;
}
|
public boolean getTcpNoDelay() {
return endpoint.getTcpNoDelay();
}
|
public int getThreadPriority() {
return endpoint.getThreadPriority();
}
|
public int getTimeout() {
return timeout;
}
|
public void init() throws Exception {
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() throws Exception {
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(Boolean registrationDone) {
}
|
public void preDeregister() throws Exception {
}
|
public ObjectName preRegister(MBeanServer server,
ObjectName name) throws Exception {
oname=name;
mserver=server;
domain=name.getDomain();
return name;
}
|
public void resume() throws Exception {
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(Adapter adapter) {
this.adapter = adapter;
}
|
public void setAddress(InetAddress ia) {
endpoint.setAddress(ia);
}
|
public void setAlgorithm(String k) {
setAttribute("algorithm", k);
}
|
public void setAttribute(String name,
Object value) {
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(String ciphers) {
setAttribute("ciphers", ciphers);
}
|
public void setClientauth(String k) {
setAttribute("clientauth", k);
}
|
public void setCompressableMimeType(String valueS) {
compressableMimeTypes = valueS;
}
|
public void setCompression(String valueS) {
compression = valueS;
}
|
public void setCompressionMinSize(int valueI) {
compressionMinSize = valueI;
}
|
public void setDisableUploadTimeout(boolean isDisabled) {
disableUploadTimeout = isDisabled;
}
|
public void setExecutor(Executor executor) {
endpoint.setExecutor(executor);
}
|
public void setKeepAlive(boolean keepAlive) {
if (!keepAlive) {
setMaxKeepAliveRequests(1);
}
}
Set the keep-alive policy for this connection. |
public void setKeepAliveTimeout(int timeout) {
keepAliveTimeout = timeout;
}
|
public void setKeyAlias(String keyAlias) {
setAttribute("keyAlias", keyAlias);
}
|
public void setKeypass(String k) {
attributes.put("keypass", k);
//setAttribute("keypass", k);
}
|
public void setKeystore(String k) {
setAttribute("keystore", k);
}
|
public void setKeytype(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(String valueS) {
noCompressionUserAgents = valueS;
}
|
public void setPort(int port) {
endpoint.setPort(port);
}
|
public void setProcessorCache(int processorCache) {
this.processorCache = processorCache;
}
|
public void setProperty(String name,
String value) {
setAttribute(name, value);
}
|
public void setProtocols(String k) {
setAttribute("protocols", k);
}
|
public void setRestrictedUserAgents(String valueS) {
restrictedUserAgents = valueS;
}
|
public void setSSLEnabled(boolean SSLEnabled) {
this.SSLEnabled = SSLEnabled;
}
|
public void setSSLImplementation(String valueS) {
sslImplementationName = valueS;
setSecure(true);
}
|
public void setSecure(boolean b) {
secure = b;
}
|
public void setServer(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(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() throws Exception {
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()));
}
|