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 ObjectName | tpOname |
protected ObjectName | rgOname |
protected org.apache.tomcat.util.net.JIoEndpoint | endpointAssociated java.io endpoint. |
protected Hashtable | attributesConfiguration attributes. |
private org.apache.coyote.Adapter | adapterAdapter which will process the requests recieved by this endpoint. |
private AjpConnectionHandler | cHandlerConnection handler for AJP. |
protected int | processorCacheProcessor cache. |
protected boolean | tomcatAuthenticationShould authentication be done in the native webserver layer,
or in the Servlet container ? |
protected String | requiredSecretRequired secret. |
protected int | packetSizeAJP packet size. |
protected int | keepAliveTimeoutThe number of seconds Tomcat will wait for a subsequent request
before closing the connection. |
protected String | domain |
protected ObjectName | oname |
protected MBeanServer | mserver |
Methods Summary |
---|
public void | destroy()
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.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.Object | getAttribute(java.lang.String key)
if (log.isTraceEnabled()) {
log.trace(sm.getString("ajpprotocol.getattribute", key));
}
return attributes.get(key);
|
public java.util.Iterator | getAttributeNames()
return attributes.keySet().iterator();
|
public int | getBacklog() return endpoint.getBacklog();
|
public java.lang.String | getDomain()
return domain;
|
public java.util.concurrent.Executor | getExecutor() return endpoint.getExecutor();
|
public int | getKeepAliveTimeout()
return keepAliveTimeout;
|
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 ("ajp-" + encodedAddr + endpoint.getPort());
|
public javax.management.ObjectName | getObjectName()
return oname;
|
public int | getPacketSize()
return packetSize;
|
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 int | getSoLinger() return endpoint.getSoLinger();
|
public int | getSoTimeout() return endpoint.getSoTimeout();
|
public boolean | getTcpNoDelay() return endpoint.getTcpNoDelay();
|
public int | getThreadPriority() return endpoint.getThreadPriority();
|
public boolean | getTomcatAuthentication()
return tomcatAuthentication;
|
public void | init()Start the protocol
endpoint.setName(getName());
endpoint.setHandler(cHandler);
try {
endpoint.init();
} catch (Exception ex) {
log.error(sm.getString("ajpprotocol.endpoint.initerror"), ex);
throw ex;
}
if (log.isInfoEnabled()) {
log.info(sm.getString("ajpprotocol.init", getName()));
}
|
public void | pause()
try {
endpoint.pause();
} catch (Exception ex) {
log.error(sm.getString("ajpprotocol.endpoint.pauseerror"), ex);
throw ex;
}
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.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("ajpprotocol.endpoint.resumeerror"), ex);
throw ex;
}
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.resume", getName()));
|
public void | setAdapter(org.apache.coyote.Adapter adapter)The adapter, used to call the connector
this.adapter = adapter;
|
public void | setAddress(java.net.InetAddress ia) endpoint.setAddress(ia);
|
public void | setAttribute(java.lang.String name, java.lang.Object value)Pass config info
// --------------------------------------------------------- Public Methods
if (log.isTraceEnabled()) {
log.trace(sm.getString("ajpprotocol.setattribute", name, value));
}
attributes.put(name, value);
|
public void | setBacklog(int backlog) endpoint.setBacklog(backlog);
|
public void | setExecutor(java.util.concurrent.Executor executor) endpoint.setExecutor(executor);
|
public void | setKeepAliveTimeout(int timeout) keepAliveTimeout = timeout;
|
public void | setMaxThreads(int maxThreads) endpoint.setMaxThreads(maxThreads);
|
public void | setPacketSize(int packetSize) this.packetSize = packetSize;
|
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 | setRequiredSecret(java.lang.String requiredSecret)
this.requiredSecret = requiredSecret;
|
public void | setSoLinger(int soLinger) endpoint.setSoLinger(soLinger);
|
public void | setSoTimeout(int soTimeout) endpoint.setSoTimeout(soTimeout);
|
public void | setTcpNoDelay(boolean tcpNoDelay) endpoint.setTcpNoDelay(tcpNoDelay);
|
public void | setThreadPriority(int threadPriority) endpoint.setThreadPriority(threadPriority);
|
public void | setTomcatAuthentication(boolean tomcatAuthentication) this.tomcatAuthentication = tomcatAuthentication;
|
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 threadpool" );
}
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("ajpprotocol.endpoint.starterror"), ex);
throw ex;
}
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.start", getName()));
|