Method from org.apache.coyote.ajp.AjpProtocol Detail: |
public void destroy() throws Exception {
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 Adapter getAdapter() {
return adapter;
}
|
public InetAddress getAddress() {
return endpoint.getAddress();
}
|
public Object getAttribute(String key) {
if (log.isTraceEnabled()) {
log.trace(sm.getString("ajpprotocol.getattribute", key));
}
return attributes.get(key);
}
|
public Iterator getAttributeNames() {
return attributes.keySet().iterator();
}
|
public int getBacklog() {
return endpoint.getBacklog();
}
|
public String getDomain() {
return domain;
}
|
public Executor getExecutor() {
return endpoint.getExecutor();
}
|
public int getKeepAliveTimeout() {
return keepAliveTimeout;
}
|
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 ("ajp-" + encodedAddr + endpoint.getPort());
}
|
public ObjectName getObjectName() {
return oname;
}
|
public int getPacketSize() {
return packetSize;
}
|
public int getPort() {
return endpoint.getPort();
}
|
public int getProcessorCache() {
return this.processorCache;
}
|
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() throws Exception {
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() throws Exception {
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(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("ajpprotocol.endpoint.resumeerror"), ex);
throw ex;
}
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.resume", getName()));
}
|
public void setAdapter(Adapter adapter) {
this.adapter = adapter;
}
The adapter, used to call the connector |
public void setAddress(InetAddress ia) {
endpoint.setAddress(ia);
}
|
public void setAttribute(String name,
Object value) {
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(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) {
if(packetSize < Constants.MAX_PACKET_SIZE) {
this.packetSize = Constants.MAX_PACKET_SIZE;
} else {
this.packetSize = packetSize;
}
}
|
public void setPort(int port) {
endpoint.setPort(port);
}
|
public void setProcessorCache(int processorCache) {
this.processorCache = processorCache;
}
|
public void setRequiredSecret(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() 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 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()));
}
|