| Method from org.apache.coyote.tomcat5.CoyoteConnector Detail: |
public void addLifecycleListener(LifecycleListener listener) {
lifecycle.addLifecycleListener(listener);
}
Add a lifecycle event listener to this component. |
public Request createRequest() {
CoyoteRequest request = new CoyoteRequest();
request.setConnector(this);
return (request);
}
Create (or allocate) and return a Request object suitable for
specifying the contents of a Request to the responsible Container. |
public Response createResponse() {
CoyoteResponse response = new CoyoteResponse();
response.setConnector(this);
return (response);
}
Create (or allocate) and return a Response object suitable for
receiving the contents of a Response from the responsible Container. |
public void destroy() throws Exception {
if( oname!=null && controller==oname ) {
if (log.isDebugEnabled()) {
log.debug("Unregister itself " + oname );
}
Registry.getRegistry().unregisterComponent(oname);
}
if( getService() == null)
return;
getService().removeConnector(this);
}
|
public LifecycleListener[] findLifecycleListeners() {
return null;//lifecycle.findLifecycleListeners();
}
Get the lifecycle listeners associated with this lifecycle. If this
Lifecycle has no listeners registered, a zero-length array is returned. |
public int getAcceptCount() {
return (acceptCount);
}
Return the accept count for this Connector. |
public Adapter getAdapter() {
return adapter;
}
Get the Adapter used by this connector. |
public String getAddress() {
return (this.address);
}
Return the bind IP address for this Connector. |
public boolean getAllowTrace() {
return (this.allowTrace);
}
True if the TRACE method is allowed. Default value is "false". |
public boolean getAuthPassthroughEnabled() {
return this.authPassthroughEnabled;
}
Returns the value of this connector's authPassthroughEnabled flag. |
public boolean getBlocking() {
return (this.blocking);
}
Return the blocking connection flag that will be assigned to requests
received through this connector. Default value is "false". |
public int getBufferSize() {
return (this.bufferSize);
}
Return the input buffer size for this Connector. |
public X509Certificate[] getCertificates(Request 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;
}
Get the underlying WebContainer certificate for the request |
public String getCiphers() {
String ret = (String) getProperty("ciphers");
if (ret == null) {
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
ret = ((CoyoteServerSocketFactory)factory).getCiphers();
}
}
return ret;
}
Gets the list of SSL cipher suites that are to be enabled |
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 String getCompression() {
return (compression);
}
Get the value of compression. |
public int getConnectionLinger() {
return (connectionLinger);
}
Return the connection linger for this Connector. |
public int getConnectionTimeout() {
return (connectionTimeout);
}
Return the connection timeout for this Connector. |
public int getConnectionUploadTimeout() {
return (connectionUploadTimeout);
}
Return the connection upload timeout for this Connector. |
public Container getContainer() {
if( container==null ) {
// Lazy - maybe it was added later
findContainer();
}
return (container);
}
Return the Container used for processing requests received by this
Connector. |
public ObjectName getController() {
return controller;
}
|
public int getDebug() {
return (debug);
}
Return the debugging detail level for this component. |
public String getDefaultHost() {
return this.defaultHost;
}
Gets the default host of this Connector. |
public boolean getDisableUploadTimeout() {
return disableUploadTimeout;
}
Return the flag that specifies upload time-out behavior. |
public String getDomain() {
return domain;
}
|
public boolean getEnableLookups() {
return (this.enableLookups);
}
Return the "enable DNS lookups" flag. |
public ServerSocketFactory getFactory() {
return (this.factory);
}
Return the server socket factory used by this Container. |
public String getInfo() {
return (info);
}
Return descriptive information about this Connector implementation. |
public boolean getKeepAlive() {
return ((maxKeepAliveRequests != 0) && (maxKeepAliveRequests != 1));
}
Return the Keep-Alive policy for the connection. |
public String getKeyAlias() {
String ret = (String) getProperty("keyAlias");
if (ret == null) {
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
ret = ((CoyoteServerSocketFactory)factory).getKeyAlias();
}
}
return ret;
}
Gets the alias name of the keypair and supporting certificate chain
used by this Connector to authenticate itself to SSL clients. |
public 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 String getKeystorePass() {
String ret = (String) getProperty("keypass");
if (ret == null) {
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory ) {
return ((CoyoteServerSocketFactory)factory).getKeystorePass();
}
}
return ret;
}
|
public Mapper getMapper() {
return (mapper);
}
|
public int getMaxHttpHeaderSize() {
return maxHttpHeaderSize;
}
Return the maximum HTTP header size. |
public int getMaxKeepAliveRequests() {
return maxKeepAliveRequests;
}
Return the maximum number of Keep-Alive requests to honor
per connection. |
public int getMaxPostSize() {
return (maxPostSize);
}
Return the maximum size of a POST which will be automatically
parsed by the container. |
public int getMaxProcessors() {
return (maxProcessors);
}
Return the maximum number of processors allowed, or <0 for unlimited. |
public int getMinProcessors() {
return (minProcessors);
}
Return the minimum number of processors to start at initialization. |
public ObjectName getObjectName() {
return oname;
}
|
public int getPort() {
return (this.port);
}
Return the port number on which we listen for requests. |
public Object getProperty(String name) {
return properties.get(name);
}
Return a configured property. |
public String getProtocol() {
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;
}
Return the Coyote protocol handler in use. |
public ProtocolHandler getProtocolHandler() {
return (this.protocolHandler);
}
Return the protocol handler associated with the connector. |
public String getProtocolHandlerClassName() {
return (this.protocolHandlerClassName);
}
Return the class name of the Coyote protocol handler in use. |
public ProxyHandler getProxyHandler() {
return proxyHandler;
}
Gets the ProxyHandler instance associated with this CoyoteConnector. |
public String getProxyName() {
return (this.proxyName);
}
Return the proxy server name for this Connector. |
public int getProxyPort() {
return (this.proxyPort);
}
Return the proxy server port for this Connector. |
public int getRedirectPort() {
return (this.redirectPort);
}
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. |
public String getScheme() {
return (this.scheme);
}
Return the scheme that will be assigned to requests received
through this connector. Default value is "http". |
public boolean getSecure() {
return (this.secure);
}
Return the secure connection flag that will be assigned to requests
received through this connector. Default value is "false". |
public String getSelectorThreadImpl() {
return selectorThreadImpl;
}
Get the underlying SelectorThread implementation, null if
the default is used. |
public int getServerSocketTimeout() {
return (serverSocketTimeout);
}
Return the server socket timeout for this Connector. |
public Service getService() {
return (this.service);
}
Return the Service with which we are associated (if any). |
public String getSslProtocol() {
String ret = (String) getProperty("sslProtocol");
if (ret == null) {
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
ret = ((CoyoteServerSocketFactory)factory).getProtocol();
}
}
return ret;
}
Gets the SSL protocol variant to be used. |
public String getSslProtocols() {
String ret = (String) getProperty("sslProtocols");
if (ret == null) {
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
ret = ((CoyoteServerSocketFactory)factory).getProtocols();
}
}
return ret;
}
Gets the SSL protocol variants to be enabled. |
public boolean getTcpNoDelay() {
return (this.tcpNoDelay);
}
Return the TCP no delay flag value. |
public boolean getTomcatAuthentication() {
return tomcatAuthentication;
}
|
public String getURIEncoding() {
return (this.uriEncoding);
}
Return the character encoding to be used for the URI. |
public void init() throws Exception {
if( this.getService() != null ) {
if (log.isDebugEnabled()) {
log.debug( "Already configured" );
}
return;
}
if( container==null ) {
findContainer();
}
}
|
public void initialize() throws LifecycleException {
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));
}
}
Initialize this connector (create ServerSocket here!) |
public boolean isAvailable() {
return (started);
}
Is this connector available for processing requests? |
public boolean isEnabled() {
return isEnabled;
}
|
public boolean isXpoweredBy() {
return xpoweredBy;
}
Indicates whether the generation of an X-Powered-By response header for
servlet-generated responses is enabled or disabled for this Connector. |
public void postDeregister() {
try {
if( started ) {
stop();
}
} catch( Throwable t ) {
log.error( "Unregistering - can't stop", t);
}
}
|
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 removeLifecycleListener(LifecycleListener listener) {
lifecycle.removeLifecycleListener(listener);
}
Remove a lifecycle event listener from this component. |
public void removeProperty(String name) {
properties.remove(name);
}
remove a configured property. |
public void setAcceptCount(int count) {
this.acceptCount = count;
setProperty("backlog", String.valueOf(count));
}
Set the accept count for this Connector. |
public void setAdapter(Adapter adapter) {
this.adapter = adapter;
}
Set the Adapter used by this connector. |
public void setAddress(String address) {
this.address = address;
setProperty("address", address);
}
Set the bind IP address for this Connector. |
public void setAllowTrace(boolean allowTrace) {
this.allowTrace = allowTrace;
setProperty("allowTrace", String.valueOf(allowTrace));
}
Set the allowTrace flag, to disable or enable the TRACE HTTP method. * |
public void setAuthPassthroughEnabled(boolean authPassthroughEnabled) {
this.authPassthroughEnabled = authPassthroughEnabled;
}
Sets the value of this connector's authPassthroughEnabled flag. |
public void setBlocking(boolean blocking) {
this.blocking = blocking;
setProperty("blocking", String.valueOf(blocking));
}
Set the blocking connection flag that will be assigned to requests
received through this connector. |
public void setBufferSize(int bufferSize) {
this.bufferSize = bufferSize;
setProperty("bufferSize", String.valueOf(bufferSize));
}
Set the input buffer size for this Connector. |
public void setCiphers(String ciphers) {
setProperty("ciphers", ciphers);
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
((CoyoteServerSocketFactory)factory).setCiphers(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. |
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(String compression) {
this.compression = compression;
setProperty("compression", compression);
}
Set the value of compression. |
public void setConnectionLinger(int connectionLinger) {
this.connectionLinger = connectionLinger;
setProperty("soLinger", String.valueOf(connectionLinger));
}
Set the connection linger for this Connector. |
public void setConnectionTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
setProperty("soTimeout", String.valueOf(connectionTimeout));
}
Set the connection timeout for this Connector. |
public void setConnectionUploadTimeout(int connectionUploadTimeout) {
this.connectionUploadTimeout = connectionUploadTimeout;
setProperty("timeout", String.valueOf(connectionUploadTimeout));
}
Set the connection upload timeout for this Connector. |
public void setContainer(Container container) {
this.container = container;
}
Set the Container used for processing requests received by this
Connector. |
public void setController(ObjectName controller) {
this.controller = controller;
}
|
public void setDebug(int debug) {
this.debug = debug;
}
Set the debugging detail level for this component. |
public void setDefaultHost(String defaultHost) {
this.defaultHost = defaultHost;
}
Sets the default host for this Connector. |
public void setDisableUploadTimeout(boolean isDisabled) {
disableUploadTimeout = isDisabled;
setProperty("disableUploadTimeout", String.valueOf(isDisabled));
}
Set the flag to specify upload time-out behavior. |
public void setEnableLookups(boolean enableLookups) {
this.enableLookups = enableLookups;
setProperty("enableLookups", String.valueOf(enableLookups));
}
Set the "enable DNS lookups" flag. |
public void setFactory(ServerSocketFactory factory) {
this.factory = factory;
}
Set the server socket factory used by this Container. |
public void setIsEnabled(boolean isEnabled) {
this.isEnabled = isEnabled;
}
|
public void setKeepAlive(boolean keepAlive) {
if (!keepAlive) {
setMaxKeepAliveRequests(1);
}
}
Set the keep-alive policy for this connection. |
public void setKeyAlias(String alias) {
setProperty("keyAlias", alias);
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
((CoyoteServerSocketFactory)factory).setKeyAlias(alias);
}
}
Sets the alias name of the keypair and supporting certificate chain
used by this Connector to authenticate itself to SSL clients. |
public void setKeystoreFile(String keystoreFile) {
setProperty("keystore", keystoreFile);
ServerSocketFactory factory = this.getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
((CoyoteServerSocketFactory)factory).setKeystoreFile(keystoreFile);
}
}
|
public void setKeystorePass(String keystorePass) {
setProperty("keypass", keystorePass);
ServerSocketFactory factory = getFactory();
if( factory instanceof CoyoteServerSocketFactory ) {
((CoyoteServerSocketFactory)factory).setKeystorePass(keystorePass);
}
}
|
public void setMaxHttpHeaderSize(int size) {
maxHttpHeaderSize = size;
setProperty("maxHttpHeaderSize", String.valueOf(size));
}
Set the maximum HTTP header size. |
public void setMaxKeepAliveRequests(int mkar) {
maxKeepAliveRequests = mkar;
setProperty("maxKeepAliveRequests", String.valueOf(mkar));
}
Set the maximum number of Keep-Alive requests to honor per connection. |
public void setMaxPostSize(int maxPostSize) {
this.maxPostSize = maxPostSize;
setProperty("maxPostSize", String.valueOf(maxPostSize));
}
Set the maximum size of a POST which will be automatically
parsed by the container. |
public void setMaxProcessors(int maxProcessors) {
this.maxProcessors = maxProcessors;
setProperty("maxThreads", String.valueOf(maxProcessors));
}
Set the maximum number of processors allowed, or <0 for unlimited. |
public void setMinProcessors(int minProcessors) {
this.minProcessors = minProcessors;
setProperty("minThreads", String.valueOf(minProcessors));
}
Set the minimum number of processors to start at initialization. |
public void setPort(int port) {
this.port = port;
setProperty("port", String.valueOf(port));
}
Set the port number on which we listen for requests. |
public void setProperty(String name,
Object value) {
properties.put(name, value);
}
Set a configured property. |
public void setProtocol(String protocol) {
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);
}
}
Set the Coyote protocol which will be used by the connector. |
public void setProtocolHandler(ProtocolHandler protocolHandler) {
this.protocolHandler = protocolHandler;
}
Set the ProtocolHandler used by this connector. |
public void setProtocolHandlerClassName(String protocolHandlerClassName) {
this.protocolHandlerClassName = protocolHandlerClassName;
}
Set the class name of the Coyote protocol handler which will be used
by the connector. |
public void setProxyHandler(ProxyHandler proxyHandler) {
this.proxyHandler = proxyHandler;
}
Sets the ProxyHandler implementation for this CoyoteConnector to use. |
public void setProxyName(String proxyName) {
if(proxyName != null && proxyName.length() > 0) {
this.proxyName = proxyName;
setProperty("proxyName", proxyName);
} else {
this.proxyName = null;
removeProperty("proxyName");
}
}
Set the proxy server name for this Connector. |
public void setProxyPort(int proxyPort) {
this.proxyPort = proxyPort;
setProperty("proxyPort", String.valueOf(proxyPort));
}
Set the proxy server port for this Connector. |
public void setRedirectPort(int redirectPort) {
this.redirectPort = redirectPort;
setProperty("redirectPort", String.valueOf(redirectPort));
}
Set the redirect port number. |
public void setSSL3SessionTimeout(String timeout) {
setProperty("ssl3SessionTimeout", timeout);
}
Sets the number of seconds after which SSL3 sessions expire and are
removed from the SSL sessions cache. |
public void setSSLSessionCacheSize(String cacheSize) {
setProperty("sslSessionCacheSize", cacheSize);
}
Sets the number of SSL sessions that may be cached |
public void setSSLSessionTimeout(String timeout) {
setProperty("sslSessionTimeout", timeout);
}
Sets the number of seconds after which SSL sessions expire and are
removed from the SSL sessions cache. |
public void setScheme(String scheme) {
this.scheme = scheme;
setProperty("scheme", scheme);
}
Set the scheme that will be assigned to requests received through
this connector. |
public void setSecure(boolean secure) {
this.secure = secure;
setProperty("secure", String.valueOf(secure));
}
Set the secure connection flag that will be assigned to requests
received through this connector. |
public void setSelectorThreadImpl(String selectorThreadImpl) {
this.selectorThreadImpl = selectorThreadImpl;
}
Set the underlying SelectorThread implementation |
public void setServerSocketTimeout(int serverSocketTimeout) {
this.serverSocketTimeout = serverSocketTimeout;
setProperty("serverSoTimeout", String.valueOf(serverSocketTimeout));
}
Set the server socket timeout for this Connector. |
public void setService(Service service) {
this.service = service;
setProperty("service", service);
}
Set the Service with which we are associated (if any). |
public void setSslProtocol(String sslProtocol) {
setProperty("sslProtocol", sslProtocol);
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
((CoyoteServerSocketFactory)factory).setProtocol(sslProtocol);
}
}
Sets the SSL protocol variant to be used. |
public void setSslProtocols(String sslProtocols) {
setProperty("sslProtocols", sslProtocols);
ServerSocketFactory factory = getFactory();
if (factory instanceof CoyoteServerSocketFactory) {
((CoyoteServerSocketFactory)factory).setProtocols(sslProtocols);
}
}
Sets the SSL protocol variants to be enabled. |
public void setTcpNoDelay(boolean tcpNoDelay) {
this.tcpNoDelay = tcpNoDelay;
setProperty("tcpNoDelay", String.valueOf(tcpNoDelay));
}
Set the TCP no delay flag which will be set on the socket after
accepting a connection. |
public void setTomcatAuthentication(boolean tomcatAuthentication) {
this.tomcatAuthentication = tomcatAuthentication;
setProperty("tomcatAuthentication", String.valueOf(tomcatAuthentication));
}
|
public void setURIEncoding(String uriEncoding) {
this.uriEncoding = uriEncoding;
setProperty("uRIEncoding", uriEncoding);
}
Set the URI encoding to be used for the URI. |
public void setXpoweredBy(boolean xpoweredBy) {
this.xpoweredBy = xpoweredBy;
setProperty("xpoweredBy", String.valueOf(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. |
public void start() throws LifecycleException {
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);
}
}
}
Begin processing requests via this Connector. |
public void stop() throws LifecycleException {
// 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));
}
}
Terminate processing requests via this Connector. |