Fields Summary |
---|
private static com.sun.org.apache.commons.logging.Log | log |
private String | defaultClassNameCoyote Adapter class name.
Defaults to the CoyoteAdapter. |
private HashMap | propertiesHolder for our configured properties. |
private org.apache.catalina.Service | serviceThe Service we are associated with (if any). |
private int | acceptCountThe accept count for this Connector. |
private String | addressThe IP address on which to bind, if any. If null , all
addresses on the server will be bound. |
private boolean | allowTraceDo we allow TRACE ? |
private int | bufferSizeThe input buffer size we should create on input streams. |
protected org.apache.catalina.Container | containerThe Container used for processing requests received by this Connector. |
private String | compressionCompression value. |
private int | debugThe debugging detail level for this component. |
private boolean | enableLookupsThe "enable DNS lookups" flag for this Connector. |
private org.apache.catalina.net.ServerSocketFactory | factoryThe server socket factory for this component. |
private int | maxHttpHeaderSizeMaximum size of a HTTP header. 4KB is the default. |
private boolean | xpoweredBy |
private static final String | infoDescriptive information about this Connector implementation. |
protected org.apache.catalina.util.LifecycleSupport | lifecycleThe lifecycle event support for this component. |
protected int | minProcessorsThe minimum number of processors to start at initialization time. |
private int | maxProcessorsThe maximum number of processors allowed, or <0 for unlimited. |
private int | connectionLingerLinger value on the incoming connection.
Note : a value inferior to 0 means no linger. |
private int | connectionTimeoutTimeout value on the incoming connection.
Note : a value of 0 means no timeout. |
private int | connectionUploadTimeoutTimeout value on the incoming connection during request processing.
Note : a value of 0 means no timeout. |
private int | serverSocketTimeoutTimeout value on the server socket.
Note : a value of 0 means no timeout. |
private int | portThe port number on which we listen for requests. |
private String | proxyNameThe server name to which we should pretend requests to this Connector
were directed. This is useful when operating Tomcat behind a proxy
server, so that redirects get constructed accurately. If not specified,
the server name included in the Host header is used. |
private int | proxyPortThe server port to which we should pretent requests to this Connector
were directed. This is useful when operating Tomcat behind a proxy
server, so that redirects get constructed accurately. If not specified,
the port number specified by the port property is used. |
private int | redirectPortThe redirect port for non-SSL to SSL redirects. |
private String | defaultHostThe default host. |
private String | schemeThe request scheme that will be set on all requests received
through this connector. |
private boolean | secureThe secure connection flag that will be set on all requests received
through this connector. |
private boolean | blockingThe blocking connection flag that will be set on all requests received
through this connector. |
private boolean | tomcatAuthenticationFor jk, do tomcat authentication if true, trust server if false |
private org.apache.catalina.util.StringManager | smThe string manager for this package. |
private boolean | disableUploadTimeoutFlag to disable setting a seperate time-out for uploads.
If true , then the timeout parameter is
ignored. If false , then the timeout
parameter is used to control uploads. |
private int | maxKeepAliveRequestsMaximum number of Keep-Alive requests to honor per connection. |
private int | maxPostSizeMaximum size of a POST which will be automatically parsed by the
container. 2MB by default. |
protected boolean | initializedHas this component been initialized yet? |
private boolean | startedHas this component been started yet? |
private boolean | stoppedThe shutdown signal to our background thread |
private Thread | threadThe background thread. |
private boolean | tcpNoDelayUse TCP no delay ? |
private String | protocolHandlerClassNameCoyote Protocol handler class name.
Defaults to the Coyote HTTP/1.1 protocolHandler. |
private org.apache.coyote.ProtocolHandler | protocolHandlerCoyote protocol handler. |
private org.apache.coyote.Adapter | adapterCoyote adapter. |
private org.apache.tomcat.util.http.mapper.Mapper | mapperMapper. |
protected MapperListener | mapperListenerMapper listener. |
private String | uriEncodingURI encoding. |
private boolean | isEnabled |
protected boolean | authPassthroughEnabledFlag indicating whether this connector is receiving its requests from
a trusted intermediate server |
protected com.sun.appserv.ProxyHandler | proxyHandler |
private String | selectorThreadImplThe SelectorThread implementation class. |
protected String | domain |
protected ObjectName | oname |
protected MBeanServer | mserver |
ObjectName | controller |
Methods Summary |
---|
public void | addLifecycleListener(org.apache.catalina.LifecycleListener listener)Add a lifecycle event listener to this component.
lifecycle.addLifecycleListener(listener);
|
public org.apache.catalina.Request | createRequest()Create (or allocate) and return a Request object suitable for
specifying the contents of a Request to the responsible Container.
CoyoteRequest request = new CoyoteRequest();
request.setConnector(this);
return (request);
|
public org.apache.catalina.Response | createResponse()Create (or allocate) and return a Response object suitable for
receiving the contents of a Response from the responsible Container.
CoyoteResponse response = new CoyoteResponse();
response.setConnector(this);
return (response);
|
public void | destroy()
if( oname!=null && controller==oname ) {
if (log.isDebugEnabled()) {
log.debug("Unregister itself " + oname );
}
Registry.getRegistry().unregisterComponent(oname);
}
if( getService() == null)
return;
getService().removeConnector(this);
|
private void | findContainer()
try {
// Register to the service
ObjectName parentName=new ObjectName( domain + ":" +
"type=Service");
if (log.isDebugEnabled()) {
log.debug("Adding to " + parentName );
}
if( mserver.isRegistered(parentName )) {
mserver.invoke(parentName, "addConnector", new Object[] { this },
new String[] {"org.apache.catalina.Connector"});
// As a side effect we'll get the container field set
// Also initialize will be called
//return;
}
// XXX Go directly to the Engine
// initialize(); - is called by addConnector
ObjectName engName=new ObjectName( domain + ":" + "type=Engine");
if( mserver.isRegistered(engName )) {
Object obj=mserver.getAttribute(engName, "managedResource");
if (log.isDebugEnabled()) {
log.debug("Found engine " + obj + " " + obj.getClass());
}
container=(Container)obj;
// Internal initialize - we now have the Engine
initialize();
if (log.isDebugEnabled()) {
log.debug("Initialized");
}
// As a side effect we'll get the container field set
// Also initialize will be called
return;
}
} catch( Exception ex ) {
log.error( "Error finding container " + ex);
}
|
public org.apache.catalina.LifecycleListener[] | findLifecycleListeners()Get the lifecycle listeners associated with this lifecycle. If this
Lifecycle has no listeners registered, a zero-length array is returned.
return null;//lifecycle.findLifecycleListeners();
|
public int | getAcceptCount()Return the accept count for this Connector.
return (acceptCount);
|
public org.apache.coyote.Adapter | getAdapter()Get the Adapter used by this connector.
return adapter;
|
public java.lang.String | getAddress()Return the bind IP address for this Connector.
return (this.address);
|
public boolean | getAllowTrace()True if the TRACE method is allowed. Default value is "false".
return (this.allowTrace);
|
public boolean | getAuthPassthroughEnabled()Returns the value of this connector's authPassthroughEnabled flag.
return this.authPassthroughEnabled;
|
public boolean | getBlocking()Return the blocking connection flag that will be assigned to requests
received through this connector. Default value is "false".
return (this.blocking);
|
public int | getBufferSize()Return the input buffer size for this Connector.
return (this.bufferSize);
|
public java.security.cert.X509Certificate[] | getCertificates(org.apache.catalina.Request request)Get the underlying WebContainer certificate for the request
CoyoteRequest cRequest = null;
if (request instanceof CoyoteRequest) {
cRequest=(CoyoteRequest) request;
} else {
return null;
}
X509Certificate certs[] = (X509Certificate[])
cRequest.getAttribute(Globals.CERTIFICATES_ATTR);
if ((certs == null) || (certs.length < 1)) {
certs = (X509Certificate[])
cRequest.getAttribute(Globals.SSL_CERTIFICATE_ATTR);
}
return certs;
|
public java.lang.String | getCiphers()Gets the list of SSL cipher suites that are to be enabled
String ret = (String) getProperty("ciphers");
if (ret == null) {
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
ret = ((CoyoteServerSocketFactory)factory).getCiphers();
}
}
return ret;
|
public boolean | getClientAuth()
boolean ret = false;
String prop = (String) getProperty("clientauth");
if (prop != null) {
ret = Boolean.valueOf(prop).booleanValue();
} else {
ServerSocketFactory factory = this.getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
ret = ((CoyoteServerSocketFactory)factory).getClientAuth();
}
}
return ret;
|
public java.lang.String | getCompression()Get the value of compression.
return (compression);
|
public int | getConnectionLinger()Return the connection linger for this Connector.
return (connectionLinger);
|
public int | getConnectionTimeout()Return the connection timeout for this Connector.
return (connectionTimeout);
|
public int | getConnectionUploadTimeout()Return the connection upload timeout for this Connector.
return (connectionUploadTimeout);
|
public org.apache.catalina.Container | getContainer()Return the Container used for processing requests received by this
Connector.
if( container==null ) {
// Lazy - maybe it was added later
findContainer();
}
return (container);
|
public javax.management.ObjectName | getController()
return controller;
|
public int | getDebug()Return the debugging detail level for this component.
return (debug);
|
public java.lang.String | getDefaultHost()Gets the default host of this Connector.
return this.defaultHost;
|
public boolean | getDisableUploadTimeout()Return the flag that specifies upload time-out behavior.
return disableUploadTimeout;
|
public java.lang.String | getDomain()
return domain;
|
public boolean | getEnableLookups()Return the "enable DNS lookups" flag.
return (this.enableLookups);
|
public org.apache.catalina.net.ServerSocketFactory | getFactory()Return the server socket factory used by this Container.
return (this.factory);
|
public java.lang.String | getInfo()Return descriptive information about this Connector implementation.
return (info);
|
public boolean | getKeepAlive()Return the Keep-Alive policy for the connection.
return ((maxKeepAliveRequests != 0) && (maxKeepAliveRequests != 1));
|
public java.lang.String | getKeyAlias()Gets the alias name of the keypair and supporting certificate chain
used by this Connector to authenticate itself to SSL clients.
String ret = (String) getProperty("keyAlias");
if (ret == null) {
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
ret = ((CoyoteServerSocketFactory)factory).getKeyAlias();
}
}
return ret;
|
public java.lang.String | getKeystoreFile()
String ret = (String) getProperty("keystore");
if (ret == null) {
ServerSocketFactory factory = this.getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
ret = ((CoyoteServerSocketFactory)factory).getKeystoreFile();
}
}
return ret;
|
public java.lang.String | getKeystorePass()Return keystorePass
String ret = (String) getProperty("keypass");
if (ret == null) {
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory ) {
return ((CoyoteServerSocketFactory)factory).getKeystorePass();
}
}
return ret;
|
public org.apache.tomcat.util.http.mapper.Mapper | getMapper()Return the mapper.
return (mapper);
|
public int | getMaxHttpHeaderSize()Return the maximum HTTP header size.
return maxHttpHeaderSize;
|
public int | getMaxKeepAliveRequests()Return the maximum number of Keep-Alive requests to honor
per connection.
return maxKeepAliveRequests;
|
public int | getMaxPostSize()Return the maximum size of a POST which will be automatically
parsed by the container.
return (maxPostSize);
|
public int | getMaxProcessors()Return the maximum number of processors allowed, or <0 for unlimited.
return (maxProcessors);
|
public int | getMinProcessors()Return the minimum number of processors to start at initialization.
return (minProcessors);
|
public javax.management.ObjectName | getObjectName()
return oname;
|
public int | getPort()Return the port number on which we listen for requests.
return (this.port);
|
public java.lang.Object | getProperty(java.lang.String name)Return a configured property.
// ------------------------------------------------------------- Properties
return properties.get(name);
|
public java.lang.String | getProtocol()Return the Coyote protocol handler in use.
if ("org.apache.coyote.http11.Http11Protocol".equals
(getProtocolHandlerClassName())) {
return "HTTP/1.1";
} else if ("org.apache.jk.server.JkCoyoteHandler".equals
(getProtocolHandlerClassName())) {
return "AJP/1.3";
}
return null;
|
public org.apache.coyote.ProtocolHandler | getProtocolHandler()Return the protocol handler associated with the connector.
return (this.protocolHandler);
|
public java.lang.String | getProtocolHandlerClassName()Return the class name of the Coyote protocol handler in use.
return (this.protocolHandlerClassName);
|
public com.sun.appserv.ProxyHandler | getProxyHandler()Gets the ProxyHandler instance associated with this CoyoteConnector.
return proxyHandler;
|
public java.lang.String | getProxyName()Return the proxy server name for this Connector.
return (this.proxyName);
|
public int | getProxyPort()Return the proxy server port for this Connector.
return (this.proxyPort);
|
public int | getRedirectPort()Return the port number to which a request should be redirected if
it comes in on a non-SSL port and is subject to a security constraint
with a transport guarantee that requires SSL.
return (this.redirectPort);
|
public java.lang.String | getScheme()Return the scheme that will be assigned to requests received
through this connector. Default value is "http".
return (this.scheme);
|
public boolean | getSecure()Return the secure connection flag that will be assigned to requests
received through this connector. Default value is "false".
return (this.secure);
|
public java.lang.String | getSelectorThreadImpl()Get the underlying SelectorThread implementation, null if
the default is used.
return selectorThreadImpl;
|
public int | getServerSocketTimeout()Return the server socket timeout for this Connector.
return (serverSocketTimeout);
|
public org.apache.catalina.Service | getService()Return the Service with which we are associated (if any).
return (this.service);
|
public java.lang.String | getSslProtocol()Gets the SSL protocol variant to be used.
String ret = (String) getProperty("sslProtocol");
if (ret == null) {
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
ret = ((CoyoteServerSocketFactory)factory).getProtocol();
}
}
return ret;
|
public java.lang.String | getSslProtocols()Gets the SSL protocol variants to be enabled.
String ret = (String) getProperty("sslProtocols");
if (ret == null) {
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
ret = ((CoyoteServerSocketFactory)factory).getProtocols();
}
}
return ret;
|
public boolean | getTcpNoDelay()Return the TCP no delay flag value.
return (this.tcpNoDelay);
|
public boolean | getTomcatAuthentication()
return tomcatAuthentication;
|
public java.lang.String | getURIEncoding()Return the character encoding to be used for the URI.
return (this.uriEncoding);
|
public void | init()
if( this.getService() != null ) {
if (log.isDebugEnabled()) {
log.debug( "Already configured" );
}
return;
}
if( container==null ) {
findContainer();
}
|
public void | initialize()Initialize this connector (create ServerSocket here!)
if (initialized) {
log.info(sm.getString("coyoteConnector.alreadyInitialized"));
return;
}
this.initialized = true;
if( oname == null && (container instanceof StandardEngine)) {
try {
// we are loaded directly, via API - and no name was given to us
StandardEngine cb=(StandardEngine)container;
String encodedAddr = null;
if (getAddress() != null) {
encodedAddr = URLEncoder.encode(getAddress());
}
String addSuffix=(getAddress()==null) ?"": ",address=" + encodedAddr;
oname=new ObjectName(cb.getName() + ":type=Connector,port="+
getPort() + addSuffix);
Registry.getRegistry().registerComponent(this, oname, null);
controller=oname;
} catch (Exception e) {
log.error( "Error registering connector ", e);
}
if (log.isDebugEnabled()) {
log.debug("Creating name for connector " + oname);
}
}
//START SJSAS 6363251
// Initializa adapter
//adapter = new CoyoteAdapter(this);
//END SJSAS 6363251
// Instantiate Adapter
//START SJSAS 6363251
if ( adapter == null){
try {
Class clazz = Class.forName(defaultClassName);
Constructor constructor =
clazz.getConstructor(new Class[]{CoyoteConnector.class});
adapter =
(Adapter)constructor.newInstance(new Object[]{this});
} catch (Exception e) {
throw new LifecycleException
(sm.getString
("coyoteConnector.adapterClassInstantiationFailed", e));
}
}
//END SJSAS 6363251
// Instantiate protocol handler
if ( protocolHandler == null ) {
try {
Class clazz = Class.forName(protocolHandlerClassName);
// use no-arg constructor for JkCoyoteHandler
if (protocolHandlerClassName.equals("org.apache.jk.server.JkCoyoteHandler")) {
protocolHandler = (ProtocolHandler) clazz.newInstance();
if (adapter instanceof CoyoteAdapter){
((CoyoteAdapter)adapter).setCompatWithTomcat(true);
} else {
throw new IllegalStateException
(sm.getString
("coyoteConnector.illegalAdapter",adapter));
}
// START SJSAS 6439313
} else {
Constructor constructor =
clazz.getConstructor(new Class[]{Boolean.TYPE,
Boolean.TYPE,
String.class});
protocolHandler = (ProtocolHandler)
constructor.newInstance(secure, blocking,
selectorThreadImpl);
// END SJSAS 6439313
}
} catch (Exception e) {
throw new LifecycleException
(sm.getString
("coyoteConnector.protocolHandlerInstantiationFailed", e));
}
}
protocolHandler.setAdapter(adapter);
IntrospectionUtils.setProperty(protocolHandler, "jkHome",
System.getProperty("catalina.base"));
// Configure secure socket factory
// XXX For backwards compatibility only.
if (factory instanceof CoyoteServerSocketFactory) {
IntrospectionUtils.setProperty(protocolHandler, "secure",
"" + true);
CoyoteServerSocketFactory ssf =
(CoyoteServerSocketFactory) factory;
IntrospectionUtils.setProperty(protocolHandler, "algorithm",
ssf.getAlgorithm());
if (ssf.getClientAuth()) {
IntrospectionUtils.setProperty(protocolHandler, "clientauth",
"" + ssf.getClientAuth());
}
IntrospectionUtils.setProperty(protocolHandler, "keystore",
ssf.getKeystoreFile());
IntrospectionUtils.setProperty(protocolHandler, "randomfile",
ssf.getRandomFile());
IntrospectionUtils.setProperty(protocolHandler, "rootfile",
ssf.getRootFile());
IntrospectionUtils.setProperty(protocolHandler, "keypass",
ssf.getKeystorePass());
IntrospectionUtils.setProperty(protocolHandler, "keytype",
ssf.getKeystoreType());
IntrospectionUtils.setProperty(protocolHandler, "protocol",
ssf.getProtocol());
IntrospectionUtils.setProperty(protocolHandler, "protocols",
ssf.getProtocols());
IntrospectionUtils.setProperty(protocolHandler,
"sSLImplementation",
ssf.getSSLImplementation());
IntrospectionUtils.setProperty(protocolHandler, "ciphers",
ssf.getCiphers());
IntrospectionUtils.setProperty(protocolHandler, "keyAlias",
ssf.getKeyAlias());
} else {
IntrospectionUtils.setProperty(protocolHandler, "secure",
"" + secure);
}
/* Set the configured properties. This only sets the ones that were
* explicitly configured. Default values are the responsibility of
* the protocolHandler.
*/
Iterator keys = properties.keySet().iterator();
while( keys.hasNext() ) {
String name = (String)keys.next();
String value = properties.get(name).toString();
String trnName = translateAttributeName(name);
IntrospectionUtils.setProperty(protocolHandler, trnName, value);
}
try {
protocolHandler.init();
} catch (Exception e) {
throw new LifecycleException
(sm.getString
("coyoteConnector.protocolHandlerInitializationFailed", e));
}
|
public boolean | isAvailable()Is this connector available for processing requests?
return (started);
|
public boolean | isEnabled()
return isEnabled;
|
public boolean | isXpoweredBy()Indicates whether the generation of an X-Powered-By response header for
servlet-generated responses is enabled or disabled for this Connector.
return xpoweredBy;
|
private void | log(java.lang.String message)Log a message on the Logger associated with our Container (if any).
Logger logger = container.getLogger();
String localName = "CoyoteConnector";
if (logger != null)
logger.log(localName + " " + message);
else
System.out.println(localName + " " + message);
|
private void | log(java.lang.String message, java.lang.Throwable throwable)Log a message on the Logger associated with our Container (if any).
Logger logger = container.getLogger();
String localName = "CoyoteConnector";
if (logger != null)
logger.log(localName + " " + message, throwable);
else {
System.out.println(localName + " " + message);
throwable.printStackTrace(System.out);
}
|
public void | postDeregister()
try {
if( started ) {
stop();
}
} catch( Throwable t ) {
log.error( "Unregistering - can't stop", t);
}
|
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 | removeLifecycleListener(org.apache.catalina.LifecycleListener listener)Remove a lifecycle event listener from this component.
lifecycle.removeLifecycleListener(listener);
|
public void | removeProperty(java.lang.String name)remove a configured property.
properties.remove(name);
|
public void | setAcceptCount(int count)Set the accept count for this Connector.
this.acceptCount = count;
setProperty("backlog", String.valueOf(count));
|
public void | setAdapter(org.apache.coyote.Adapter adapter)Set the Adapter used by this connector.
this.adapter = adapter;
|
public void | setAddress(java.lang.String address)Set the bind IP address for this Connector.
this.address = address;
setProperty("address", address);
|
public void | setAllowTrace(boolean allowTrace)Set the allowTrace flag, to disable or enable the TRACE HTTP method. *
this.allowTrace = allowTrace;
setProperty("allowTrace", String.valueOf(allowTrace));
|
public void | setAuthPassthroughEnabled(boolean authPassthroughEnabled)Sets the value of this connector's authPassthroughEnabled flag.
this.authPassthroughEnabled = authPassthroughEnabled;
|
public void | setBlocking(boolean blocking)Set the blocking connection flag that will be assigned to requests
received through this connector.
this.blocking = blocking;
setProperty("blocking", String.valueOf(blocking));
|
public void | setBufferSize(int bufferSize)Set the input buffer size for this Connector.
this.bufferSize = bufferSize;
setProperty("bufferSize", String.valueOf(bufferSize));
|
public void | setCiphers(java.lang.String ciphers)Sets the SSL cipher suites that are to be enabled.
Only those SSL cipher suites that are actually supported by
the underlying SSL implementation will be enabled.
setProperty("ciphers", ciphers);
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
((CoyoteServerSocketFactory)factory).setCiphers(ciphers);
}
|
public void | setClientAuth(boolean clientAuth)
setProperty("clientauth", String.valueOf(clientAuth));
ServerSocketFactory factory = this.getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
((CoyoteServerSocketFactory)factory).setClientAuth(clientAuth);
}
|
public void | setCompression(java.lang.String compression)Set the value of compression.
this.compression = compression;
setProperty("compression", compression);
|
public void | setConnectionLinger(int connectionLinger)Set the connection linger for this Connector.
this.connectionLinger = connectionLinger;
setProperty("soLinger", String.valueOf(connectionLinger));
|
public void | setConnectionTimeout(int connectionTimeout)Set the connection timeout for this Connector.
this.connectionTimeout = connectionTimeout;
setProperty("soTimeout", String.valueOf(connectionTimeout));
|
public void | setConnectionUploadTimeout(int connectionUploadTimeout)Set the connection upload timeout for this Connector.
this.connectionUploadTimeout = connectionUploadTimeout;
setProperty("timeout", String.valueOf(connectionUploadTimeout));
|
public void | setContainer(org.apache.catalina.Container container)Set the Container used for processing requests received by this
Connector.
this.container = container;
|
public void | setController(javax.management.ObjectName controller)
this.controller = controller;
|
public void | setDebug(int debug)Set the debugging detail level for this component.
this.debug = debug;
|
public void | setDefaultHost(java.lang.String defaultHost)Sets the default host for this Connector.
this.defaultHost = defaultHost;
|
public void | setDisableUploadTimeout(boolean isDisabled)Set the flag to specify upload time-out behavior.
disableUploadTimeout = isDisabled;
setProperty("disableUploadTimeout", String.valueOf(isDisabled));
|
public void | setEnableLookups(boolean enableLookups)Set the "enable DNS lookups" flag.
this.enableLookups = enableLookups;
setProperty("enableLookups", String.valueOf(enableLookups));
|
public void | setFactory(org.apache.catalina.net.ServerSocketFactory factory)Set the server socket factory used by this Container.
this.factory = factory;
|
public void | setIsEnabled(boolean isEnabled)
this.isEnabled = isEnabled;
|
public void | setKeepAlive(boolean keepAlive)Set the keep-alive policy for this connection.
if (!keepAlive) {
setMaxKeepAliveRequests(1);
}
|
public void | setKeyAlias(java.lang.String alias)Sets the alias name of the keypair and supporting certificate chain
used by this Connector to authenticate itself to SSL clients.
setProperty("keyAlias", alias);
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
((CoyoteServerSocketFactory)factory).setKeyAlias(alias);
}
|
public void | setKeystoreFile(java.lang.String keystoreFile)
setProperty("keystore", keystoreFile);
ServerSocketFactory factory = this.getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
((CoyoteServerSocketFactory)factory).setKeystoreFile(keystoreFile);
}
|
public void | setKeystorePass(java.lang.String keystorePass)Set keystorePass
setProperty("keypass", keystorePass);
ServerSocketFactory factory = getFactory();
if( factory instanceof CoyoteServerSocketFactory ) {
((CoyoteServerSocketFactory)factory).setKeystorePass(keystorePass);
}
|
public void | setMaxHttpHeaderSize(int size)Set the maximum HTTP header size.
maxHttpHeaderSize = size;
setProperty("maxHttpHeaderSize", String.valueOf(size));
|
public void | setMaxKeepAliveRequests(int mkar)Set the maximum number of Keep-Alive requests to honor per connection.
maxKeepAliveRequests = mkar;
setProperty("maxKeepAliveRequests", String.valueOf(mkar));
|
public void | setMaxPostSize(int maxPostSize)Set the maximum size of a POST which will be automatically
parsed by the container.
this.maxPostSize = maxPostSize;
setProperty("maxPostSize", String.valueOf(maxPostSize));
|
public void | setMaxProcessors(int maxProcessors)Set the maximum number of processors allowed, or <0 for unlimited.
this.maxProcessors = maxProcessors;
setProperty("maxThreads", String.valueOf(maxProcessors));
|
public void | setMinProcessors(int minProcessors)Set the minimum number of processors to start at initialization.
this.minProcessors = minProcessors;
setProperty("minThreads", String.valueOf(minProcessors));
|
public void | setPort(int port)Set the port number on which we listen for requests.
this.port = port;
setProperty("port", String.valueOf(port));
|
public void | setProperty(java.lang.String name, java.lang.Object value)Set a configured property.
properties.put(name, value);
|
public void | setProtocol(java.lang.String protocol)Set the Coyote protocol which will be used by the connector.
if (protocol.equals("HTTP/1.1")) {
setProtocolHandlerClassName
("org.apache.coyote.http11.Http11Protocol");
} else if (protocol.equals("AJP/1.3")) {
setProtocolHandlerClassName
("org.apache.jk.server.JkCoyoteHandler");
} else {
setProtocolHandlerClassName(null);
}
|
public void | setProtocolHandler(org.apache.coyote.ProtocolHandler protocolHandler)Set the ProtocolHandler used by this connector.
this.protocolHandler = protocolHandler;
|
public void | setProtocolHandlerClassName(java.lang.String protocolHandlerClassName)Set the class name of the Coyote protocol handler which will be used
by the connector.
this.protocolHandlerClassName = protocolHandlerClassName;
|
public void | setProxyHandler(com.sun.appserv.ProxyHandler proxyHandler)Sets the ProxyHandler implementation for this CoyoteConnector to use.
this.proxyHandler = proxyHandler;
|
public void | setProxyName(java.lang.String proxyName)Set the proxy server name for this Connector.
if(proxyName != null && proxyName.length() > 0) {
this.proxyName = proxyName;
setProperty("proxyName", proxyName);
} else {
this.proxyName = null;
removeProperty("proxyName");
}
|
public void | setProxyPort(int proxyPort)Set the proxy server port for this Connector.
this.proxyPort = proxyPort;
setProperty("proxyPort", String.valueOf(proxyPort));
|
public void | setRedirectPort(int redirectPort)Set the redirect port number.
this.redirectPort = redirectPort;
setProperty("redirectPort", String.valueOf(redirectPort));
|
public void | setSSL3SessionTimeout(java.lang.String timeout)Sets the number of seconds after which SSL3 sessions expire and are
removed from the SSL sessions cache.
setProperty("ssl3SessionTimeout", timeout);
|
public void | setSSLSessionCacheSize(java.lang.String cacheSize)Sets the number of SSL sessions that may be cached
setProperty("sslSessionCacheSize", cacheSize);
|
public void | setSSLSessionTimeout(java.lang.String timeout)Sets the number of seconds after which SSL sessions expire and are
removed from the SSL sessions cache.
setProperty("sslSessionTimeout", timeout);
|
public void | setScheme(java.lang.String scheme)Set the scheme that will be assigned to requests received through
this connector.
this.scheme = scheme;
setProperty("scheme", scheme);
|
public void | setSecure(boolean secure)Set the secure connection flag that will be assigned to requests
received through this connector.
this.secure = secure;
setProperty("secure", String.valueOf(secure));
|
public void | setSelectorThreadImpl(java.lang.String selectorThreadImpl)Set the underlying SelectorThread implementation
this.selectorThreadImpl = selectorThreadImpl;
|
public void | setServerSocketTimeout(int serverSocketTimeout)Set the server socket timeout for this Connector.
this.serverSocketTimeout = serverSocketTimeout;
setProperty("serverSoTimeout", String.valueOf(serverSocketTimeout));
|
public void | setService(org.apache.catalina.Service service)Set the Service with which we are associated (if any).
this.service = service;
setProperty("service", service);
|
public void | setSslProtocol(java.lang.String sslProtocol)Sets the SSL protocol variant to be used.
setProperty("sslProtocol", sslProtocol);
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
((CoyoteServerSocketFactory)factory).setProtocol(sslProtocol);
}
|
public void | setSslProtocols(java.lang.String sslProtocols)Sets the SSL protocol variants to be enabled.
setProperty("sslProtocols", sslProtocols);
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
((CoyoteServerSocketFactory)factory).setProtocols(sslProtocols);
}
|
public void | setTcpNoDelay(boolean tcpNoDelay)Set the TCP no delay flag which will be set on the socket after
accepting a connection.
this.tcpNoDelay = tcpNoDelay;
setProperty("tcpNoDelay", String.valueOf(tcpNoDelay));
|
public void | setTomcatAuthentication(boolean tomcatAuthentication)
this.tomcatAuthentication = tomcatAuthentication;
setProperty("tomcatAuthentication", String.valueOf(tomcatAuthentication));
|
public void | setURIEncoding(java.lang.String uriEncoding)Set the URI encoding to be used for the URI.
this.uriEncoding = uriEncoding;
setProperty("uRIEncoding", uriEncoding);
|
public void | setXpoweredBy(boolean xpoweredBy)Enables or disables the generation of an X-Powered-By header (with value
Servlet/2.4) for all servlet-generated responses returned by this
Connector.
this.xpoweredBy = xpoweredBy;
setProperty("xpoweredBy", String.valueOf(xpoweredBy));
|
public void | start()Begin processing requests via this Connector.
if( !initialized )
initialize();
// Validate and update our current state
if (started) {
log.info(sm.getString("coyoteConnector.alreadyStarted"));
return;
}
lifecycle.fireLifecycleEvent(START_EVENT, null);
started = true;
// We can't register earlier - the JMX registration of this happens
// in Server.start callback
if ( this.oname != null ) {
// We are registred - register the adapter as well.
try {
Registry.getRegistry().registerComponent
(protocolHandler, this.domain, "protocolHandler",
"type=protocolHandler,className="
+ protocolHandlerClassName);
} catch (Exception ex) {
log.error(sm.getString
("coyoteConnector.protocolRegistrationFailed"), ex);
}
} else {
log.info(sm.getString
("coyoteConnector.cannotRegisterProtocol"));
}
try {
protocolHandler.start();
} catch (Exception e) {
throw new LifecycleException
(sm.getString
("coyoteConnector.protocolHandlerStartFailed", e));
}
if( this.domain != null ) {
mapperListener.setDomain( domain );
// BEGIN S1AS 5000999
mapperListener.setPort(this.getPort());
mapperListener.setDefaultHost(this.defaultHost);
// END S1AS 5000999
//mapperListener.setEngine( service.getContainer().getName() );
mapperListener.init();
try {
Registry.getRegistry().registerComponent
(mapper, this.domain, "Mapper",
"type=Mapper");
} catch (Exception ex) {
log.error(sm.getString
("coyoteConnector.protocolRegistrationFailed"), ex);
}
}
|
public void | stop()Terminate processing requests via this Connector.
// Validate and update our current state
if (!started) {
log.error(sm.getString("coyoteConnector.notStarted"));
return;
}
lifecycle.fireLifecycleEvent(STOP_EVENT, null);
started = false;
// START PWC 6393300
if ( domain != null){
try {
Registry.getRegistry().unregisterComponent(new ObjectName(domain,"type", "Mapper"));
Registry.getRegistry().unregisterComponent(new ObjectName(domain
+ ":type=protocolHandler,className="
+ protocolHandlerClassName));
} catch (MalformedObjectNameException e) {
log.info( "Error unregistering mapper ", e);
}
}
// END PWC 6393300
try {
protocolHandler.destroy();
} catch (Exception e) {
throw new LifecycleException
(sm.getString
("coyoteConnector.protocolHandlerDestroyFailed", e));
}
|
private java.lang.String | translateAttributeName(java.lang.String name)
if ("clientAuth".equals(name)) {
return "clientauth";
} else if ("keystoreFile".equals(name)) {
return "keystore";
} else if ("randomFile".equals(name)) {
return "randomfile";
} else if ("rootFile".equals(name)) {
return "rootfile";
} else if ("keystorePass".equals(name)) {
return "keypass";
} else if ("keystoreType".equals(name)) {
return "keytype";
} else if ("sslProtocol".equals(name)) {
return "protocol";
} else if ("sslProtocols".equals(name)) {
return "protocols";
}
return name;
|