|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.util.LifecycleBase org.apache.catalina.util.LifecycleMBeanBase org.apache.catalina.connector.Connector
public class Connector
Implementation of a Coyote connector.
Field Summary | |
---|---|
protected Adapter |
adapter
Coyote adapter. |
protected boolean |
allowTrace
Do we allow TRACE ? |
protected long |
asyncTimeout
Default timeout for asynchronous requests (ms). |
protected boolean |
enableLookups
The "enable DNS lookups" flag for this Connector. |
protected static String |
info
Descriptive information about this Connector implementation. |
protected Mapper |
mapper
Mapper. |
protected MapperListener |
mapperListener
Mapper listener. |
protected int |
maxParameterCount
The maximum number of parameters (GET plus POST) which will be automatically parsed by the container. 10000 by default. |
protected int |
maxPostSize
Maximum size of a POST which will be automatically parsed by the container. 2MB by default. |
protected int |
maxSavePostSize
Maximum size of a POST which will be saved by the container during authentication. 4kB by default |
protected String |
parseBodyMethods
Comma-separated list of HTTP methods that will be parsed according to POST-style rules for application/x-www-form-urlencoded request bodies. |
protected HashSet<String> |
parseBodyMethodsSet
A Set of methods determined by parseBodyMethods . |
protected int |
port
The port number on which we listen for requests. |
protected ProtocolHandler |
protocolHandler
Coyote protocol handler. |
protected String |
protocolHandlerClassName
Coyote Protocol handler class name. |
protected String |
proxyName
The server name to which we should pretend requests to this Connector were directed. |
protected int |
proxyPort
The server port to which we should pretend requests to this Connector were directed. |
static boolean |
RECYCLE_FACADES
Alternate flag to enable recycling of facades. |
protected int |
redirectPort
The redirect port for non-SSL to SSL redirects. |
protected static HashMap<String,String> |
replacements
|
protected String |
scheme
The request scheme that will be set on all requests received through this connector. |
protected boolean |
secure
The secure connection flag that will be set on all requests received through this connector. |
protected Service |
service
The Service we are associated with (if any). |
protected static StringManager |
sm
The string manager for this package. |
protected String |
URIEncoding
URI encoding. |
protected boolean |
useBodyEncodingForURI
URI encoding as body. |
protected boolean |
useIPVHosts
Flag to use IP-based virtual hosting. |
protected boolean |
xpoweredBy
|
Fields inherited from class org.apache.catalina.util.LifecycleMBeanBase |
---|
mserver |
Fields inherited from interface org.apache.catalina.Lifecycle |
---|
AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT |
Constructor Summary | |
---|---|
Connector()
|
|
Connector(String protocol)
|
Method Summary | |
---|---|
protected String |
createObjectNameKeyProperties(String type)
|
Request |
createRequest()
Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible Container. |
Response |
createResponse()
Create (or allocate) and return a Response object suitable for receiving the contents of a Response from the responsible Container. |
protected void |
destroyInternal()
Sub-classes wishing to perform additional clean-up should override this method, ensuring that super.destroyInternal() is the last call in the overriding method. |
boolean |
getAllowTrace()
True if the TRACE method is allowed. |
long |
getAsyncTimeout()
Return the default timeout for async requests in ms. |
Object |
getAttribute(String name)
Return a configured property. |
protected String |
getDomainInternal()
Method implemented by sub-classes to identify the domain in which MBeans should be registered. |
boolean |
getEnableLookups()
Return the "enable DNS lookups" flag. |
String |
getExecutorName()
|
String |
getInfo()
Return descriptive information about this Connector implementation. |
int |
getLocalPort()
Return the port number on which this connector is listening to requests. |
Mapper |
getMapper()
Return the mapper. |
int |
getMaxHeaderCount()
Return the maximum number of headers that are allowed by the container. |
int |
getMaxParameterCount()
Return the maximum number of parameters (GET plus POST) that will be automatically parsed by the container. |
int |
getMaxPostSize()
Return the maximum size of a POST which will be automatically parsed by the container. |
int |
getMaxSavePostSize()
Return the maximum size of a POST which will be saved by the container during authentication. |
protected String |
getObjectNameKeyProperties()
Allow sub-classes to specify the key properties component of the ObjectName that will be used to register this component. |
String |
getParseBodyMethods()
|
int |
getPort()
Return the port number on which this connector is configured to listen for requests. |
Object |
getProperty(String name)
Return a configured property. |
String |
getProtocol()
Return the Coyote protocol handler in use. |
ProtocolHandler |
getProtocolHandler()
Return the protocol handler associated with the connector. |
String |
getProtocolHandlerClassName()
Return the class name of the Coyote protocol handler in use. |
String |
getProxyName()
Return the proxy server name for this Connector. |
int |
getProxyPort()
Return the proxy server port for this Connector. |
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. |
String |
getScheme()
Return the scheme that will be assigned to requests received through this connector. |
boolean |
getSecure()
Return the secure connection flag that will be assigned to requests received through this connector. |
Service |
getService()
Return the Service with which we are associated (if any). |
String |
getURIEncoding()
Return the character encoding to be used for the URI. |
boolean |
getUseBodyEncodingForURI()
Return the true if the entity body encoding should be used for the URI. |
boolean |
getUseIPVHosts()
Test if IP-based virtual hosting is enabled. |
boolean |
getXpoweredBy()
Indicates whether the generation of an X-Powered-By response header for servlet-generated responses is enabled or disabled for this Connector. |
protected void |
initInternal()
Sub-classes wishing to perform additional initialization should override this method, ensuring that super.initInternal() is the first call in the overriding method. |
protected boolean |
isParseBodyMethod(String method)
|
void |
pause()
Pause the connector. |
void |
resume()
Pause the connector. |
void |
setAllowTrace(boolean allowTrace)
Set the allowTrace flag, to disable or enable the TRACE HTTP method. |
void |
setAsyncTimeout(long asyncTimeout)
Set the default timeout for async requests. |
void |
setAttribute(String name,
Object value)
Set a configured property. |
void |
setEnableLookups(boolean enableLookups)
Set the "enable DNS lookups" flag. |
void |
setMaxHeaderCount(int maxHeaderCount)
Set the maximum number of headers in a request that are allowed by the container. |
void |
setMaxParameterCount(int maxParameterCount)
Set the maximum number of parameters (GET plus POST) that will be automatically parsed by the container. |
void |
setMaxPostSize(int maxPostSize)
Set the maximum size of a POST which will be automatically parsed by the container. |
void |
setMaxSavePostSize(int maxSavePostSize)
Set the maximum size of a POST which will be saved by the container during authentication. |
void |
setParseBodyMethods(String methods)
|
void |
setPort(int port)
Set the port number on which we listen for requests. |
boolean |
setProperty(String name,
String value)
Set a configured property. |
void |
setProtocol(String protocol)
Set the Coyote protocol which will be used by the connector. |
void |
setProtocolHandlerClassName(String protocolHandlerClassName)
Set the class name of the Coyote protocol handler which will be used by the connector. |
void |
setProxyName(String proxyName)
Set the proxy server name for this Connector. |
void |
setProxyPort(int proxyPort)
Set the proxy server port for this Connector. |
void |
setRedirectPort(int redirectPort)
Set the redirect port number. |
void |
setScheme(String scheme)
Set the scheme that will be assigned to requests received through this connector. |
void |
setSecure(boolean secure)
Set the secure connection flag that will be assigned to requests received through this connector. |
void |
setService(Service service)
Set the Service with which we are associated (if any). |
void |
setURIEncoding(String URIEncoding)
Set the URI encoding to be used for the URI. |
void |
setUseBodyEncodingForURI(boolean useBodyEncodingForURI)
Set if the entity body encoding should be used for the URI. |
void |
setUseIPVHosts(boolean useIPVHosts)
Enable the use of IP-based virtual hosting. |
void |
setXpoweredBy(boolean xpoweredBy)
Enables or disables the generation of an X-Powered-By header (with value Servlet/2.5) for all servlet-generated responses returned by this Connector. |
protected void |
startInternal()
Begin processing requests via this Connector. |
protected void |
stopInternal()
Terminate processing requests via this Connector. |
String |
toString()
Provide a useful toString() implementation as it may be used when logging Lifecycle errors to identify the component. |
Methods inherited from class org.apache.catalina.util.LifecycleMBeanBase |
---|
getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister |
Methods inherited from class org.apache.catalina.util.LifecycleBase |
---|
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean RECYCLE_FACADES
protected Service service
Service
we are associated with (if any).
protected boolean allowTrace
protected long asyncTimeout
protected boolean enableLookups
protected boolean xpoweredBy
protected static final String info
protected int port
protected String proxyName
Host
header is used.
protected int proxyPort
port
property is used.
protected int redirectPort
protected String scheme
protected boolean secure
protected static final StringManager sm
protected int maxParameterCount
protected int maxPostSize
protected int maxSavePostSize
protected String parseBodyMethods
protected HashSet<String> parseBodyMethodsSet
parseBodyMethods
.
protected boolean useIPVHosts
protected String protocolHandlerClassName
protected ProtocolHandler protocolHandler
protected Adapter adapter
protected Mapper mapper
protected MapperListener mapperListener
protected String URIEncoding
protected boolean useBodyEncodingForURI
protected static HashMap<String,String> replacements
Constructor Detail |
---|
public Connector()
public Connector(String protocol)
Method Detail |
---|
public Object getProperty(String name)
public boolean setProperty(String name, String value)
public Object getAttribute(String name)
public void setAttribute(String name, Object value)
public Service getService()
Service
with which we are associated (if any).
public void setService(Service service)
Service
with which we are associated (if any).
service
- The service that owns this Enginepublic boolean getAllowTrace()
public void setAllowTrace(boolean allowTrace)
allowTrace
- The new allowTrace flagpublic long getAsyncTimeout()
public void setAsyncTimeout(long asyncTimeout)
asyncTimeout
- The new timeout in ms.public boolean getEnableLookups()
public void setEnableLookups(boolean enableLookups)
enableLookups
- The new "enable DNS lookups" flag valuepublic String getInfo()
public Mapper getMapper()
public int getMaxHeaderCount()
public void setMaxHeaderCount(int maxHeaderCount)
maxHeaderCount
- The new settingpublic int getMaxParameterCount()
public void setMaxParameterCount(int maxParameterCount)
maxParameterCount
- The new settingpublic int getMaxPostSize()
public void setMaxPostSize(int maxPostSize)
maxPostSize
- The new maximum size in bytes of a POST which will
be automatically parsed by the containerpublic int getMaxSavePostSize()
public void setMaxSavePostSize(int maxSavePostSize)
maxSavePostSize
- The new maximum size in bytes of a POST which will
be saved by the container during authentication.public String getParseBodyMethods()
public void setParseBodyMethods(String methods)
protected boolean isParseBodyMethod(String method)
public int getPort()
public void setPort(int port)
port
- The new port numberpublic int getLocalPort()
port
of zero is used then this method
will report the actual port bound.
public String getProtocol()
public void setProtocol(String protocol)
protocol
- The Coyote protocol namepublic String getProtocolHandlerClassName()
public void setProtocolHandlerClassName(String protocolHandlerClassName)
protocolHandlerClassName
- The new class namepublic ProtocolHandler getProtocolHandler()
public String getProxyName()
public void setProxyName(String proxyName)
proxyName
- The new proxy server namepublic int getProxyPort()
public void setProxyPort(int proxyPort)
proxyPort
- The new proxy server portpublic int getRedirectPort()
public void setRedirectPort(int redirectPort)
redirectPort
- The redirect port number (non-SSL to SSL)public String getScheme()
public void setScheme(String scheme)
scheme
- The new schemepublic boolean getSecure()
public void setSecure(boolean secure)
secure
- The new secure connection flagpublic String getURIEncoding()
public void setURIEncoding(String URIEncoding)
URIEncoding
- The new URI character encoding.public boolean getUseBodyEncodingForURI()
public void setUseBodyEncodingForURI(boolean useBodyEncodingForURI)
useBodyEncodingForURI
- The new value for the flag.public boolean getXpoweredBy()
public void setXpoweredBy(boolean xpoweredBy)
xpoweredBy
- true if generation of X-Powered-By response header is
to be enabled, false otherwisepublic void setUseIPVHosts(boolean useIPVHosts)
useIPVHosts
- true
if Hosts are identified by IP,
false/code> if Hosts are identified by name.
public boolean getUseIPVHosts()
public String getExecutorName()
public Request createRequest()
public Response createResponse()
protected String createObjectNameKeyProperties(String type)
public void pause()
public void resume()
protected void initInternal() throws LifecycleException
LifecycleMBeanBase
initInternal
in class LifecycleMBeanBase
LifecycleException
protected void startInternal() throws LifecycleException
startInternal
in class LifecycleBase
LifecycleException
- if a fatal startup error occursprotected void stopInternal() throws LifecycleException
stopInternal
in class LifecycleBase
LifecycleException
- if a fatal shutdown error occursprotected void destroyInternal() throws LifecycleException
LifecycleMBeanBase
destroyInternal
in class LifecycleMBeanBase
LifecycleException
public String toString()
toString
in class Object
protected String getDomainInternal()
LifecycleMBeanBase
getDomainInternal
in class LifecycleMBeanBase
protected String getObjectNameKeyProperties()
LifecycleMBeanBase
ObjectName
that will be used to register this component.
getObjectNameKeyProperties
in class LifecycleMBeanBase
ObjectName
|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |