Class Connector
java.lang.Object
org.apache.catalina.util.LifecycleBase
org.apache.catalina.util.LifecycleMBeanBase
org.apache.catalina.connector.Connector
- All Implemented Interfaces:
MBeanRegistration, JmxEnabled, Lifecycle
Implementation of a Coyote connector.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Lifecycle
Lifecycle.SingleUse -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AdapterCoyote adapter.protected booleanIf this istruethe '\' character will be permitted as a path delimiter.protected booleanDo we allow TRACE ?protected longDefault timeout for asynchronous requests (ms).protected final StringName of the protocol that was configured.protected booleanThe flag that controls recycling of the facades of the request processing objects.protected booleanThe "enable DNS lookups" flag for this Connector.protected booleanIf this istruethen a call toResponse.getWriter()if no character encoding has been specified will result in subsequent calls toResponse.getCharacterEncoding()returningISO-8859-1and theContent-Typeresponse header will include acharset=ISO-8859-1component.static final StringName used for the internal executor when no external executor is configured.protected intThe maximum number of parameters (GET plus POST) which will be automatically parsed by the container. 1000 by default.protected intMaximum size of a POST which will be automatically parsed by the container. 2 MiB by default.protected intMaximum size of a POST which will be saved by the container during authentication. 4 KiB by defaultprotected StringComma-separated list of HTTP methods that will be parsed according to POST-style rules for application/x-www-form-urlencoded request bodies.A Set of methods determined byparseBodyMethods.protected final ProtocolHandlerCoyote protocol handler.protected final StringCoyote Protocol handler class name.protected StringThe server name to which we should pretend requests to this Connector were directed.protected intThe server port to which we should pretend requests to this Connector were directed.protected intThe redirect port for non-SSL to SSL redirects.protected StringThe request scheme that will be set on all requests received through this connector.protected booleanThe secure connection flag that will be set on all requests received through this connector.protected ServiceTheServicewe are associated with (if any).protected static final StringManagerThe string manager for this package.protected booleanURI encoding as body.protected booleanFlag to use IP-based virtual hosting.protected booleanIs generation of X-Powered-By response header enabled/disabled?Fields inherited from interface 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
ConstructorsConstructorDescriptionDefaults to using HTTP/1.1 NIO implementation.Create a new Connector instance with the specified protocol.Connector(ProtocolHandler protocolHandler) Create a new Connector instance with the specified protocol handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSslHostConfig(SSLHostConfig sslHostConfig) Adds an SSL host configuration to this connector.voidaddUpgradeProtocol(UpgradeProtocol upgradeProtocol) Adds an upgrade protocol to this connector.protected StringCreate the key properties for the ObjectName of a registered MBean.createRequest(Request coyoteRequest) Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible Container.createResponse(Response coyoteResponse) Create and return a Response object suitable for receiving the contents of a Response from the responsible Container.protected voidSubclasses implement this method to perform any instance destruction required.Returns the SSL host configurations for this connector.Returns the registered upgrade protocols for this connector.booleanReturns whether backslash characters are allowed in URLs.booleanReturns whether the TRACE HTTP method is allowed.longReturns the default timeout for async requests.booleanReturns whether the object facades are discarded.protected StringMethod implemented by subclasses to identify the domain in which MBeans should be registered.booleanReturn the "enable DNS lookups" flag.Returns the handling mode for encoded reverse solidus (backslash) characters.Returns the internal handling mode for encoded reverse solidus (backslash) characters.Returns the handling mode for encoded solidus (forward slash) characters.Returns the internal handling mode for encoded solidus (forward slash) characters.booleanReturns whether the encoding must be enforced when calling getWriter().Returns the name of the executor associated with this connector.intReturns the port number on which this connector is actually listening.intReturns the maximum number of cookies that will be accepted in a request.intReturns the maximum number of parameters (GET plus POST) that will be automatically parsed by the container.intReturns the maximum number of parts that will be accepted in a multipart request.intReturns the maximum size of the headers for each part in a multipart request.intReturns the maximum size of a POST which will be automatically parsed by the container.intReturns the maximum size of a POST which will be saved by the container during authentication.intReturns the unique index for this connector.protected StringAllow subclasses to specify the key properties component of theObjectNamethat will be used to register this component.Returns the HTTP methods which will support body parameters parsing.intgetPort()Returns the port number on which this connector is configured to listen for requests.intReturns the port offset to be applied to the configured port.intReturns the effective port number after applying the port offset.getProperty(String name) Return a property from the protocol handler.Returns the Coyote protocol handler in use.Returns the protocol handler associated with the connector.Returns the class name of the Coyote protocol handler in use.Returns the proxy server name for this Connector.intReturns the proxy server port for this Connector.intReturns 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.intReturns the redirect port with the port offset applied.booleanReturns whether suspicious URIs should be rejected.Returns the scheme that will be assigned to requests received through this connector.booleanReturns the secure connection flag that will be assigned to requests received through this connector.Returns theServicewith which this connector is associated.Returns the Charset to use to convert raw URI bytes (after %nn decoding) to characters.Returns the name of character encoding to be used for the URI using the original case.booleanReturns whether the entity body encoding should be used for the URI.booleanTest if IP-based virtual hosting is enabled.booleanIndicates whether the generation of an X-Powered-By response header for Servlet-generated responses is enabled or disabled for this Connector.protected voidSubclasses implement this method to perform any instance initialisation required.protected booleanisParseBodyMethod(String method) Checks whether the given HTTP method is configured to allow body parameter parsing.voidpause()Pause the connector.voidresume()Resume the connector.voidsetAllowBackslash(boolean allowBackslash) Set the allowBackslash flag.voidsetAllowTrace(boolean allowTrace) Set the allowTrace flag, to disable or enable the TRACE HTTP method.voidsetAsyncTimeout(long asyncTimeout) Set the default timeout for async requests.voidsetDiscardFacades(boolean discardFacades) Set the recycling strategy for the object facades.voidsetEnableLookups(boolean enableLookups) Set the "enable DNS lookups" flag.voidsetEncodedReverseSolidusHandling(String encodedReverseSolidusHandling) Sets the handling mode for encoded reverse solidus (backslash) characters.voidsetEncodedSolidusHandling(String encodedSolidusHandling) Sets the handling mode for encoded solidus (forward slash) characters.voidsetEnforceEncodingInGetWriter(boolean enforceEncodingInGetWriter) Set the enforceEncodingInGetWriter flag.voidsetMaxCookieCount(int maxCookieCount) Sets the maximum number of cookies that will be accepted in a request.voidsetMaxParameterCount(int maxParameterCount) Set the maximum number of parameters (GET plus POST) that will be automatically parsed by the container.voidsetMaxPartCount(int maxPartCount) Sets the maximum number of parts that will be accepted in a multipart request.voidsetMaxPartHeaderSize(int maxPartHeaderSize) Sets the maximum size of the headers for each part in a multipart request.voidsetMaxPostSize(int maxPostSize) Set the maximum size of a POST which will be automatically parsed by the container.voidsetMaxSavePostSize(int maxSavePostSize) Set the maximum size of a POST which will be saved by the container during authentication.voidsetParseBodyMethods(String methods) Set list of HTTP methods which should allow body parameter parsing.voidsetPort(int port) Set the port number on which we listen for requests.voidsetPortOffset(int portOffset) Sets the port offset to be applied to the configured port.booleansetProperty(String name, String value) Set a property on the protocol handler.voidsetProxyName(String proxyName) Set the proxy server name for this Connector.voidsetProxyPort(int proxyPort) Set the proxy server port for this Connector.voidsetRedirectPort(int redirectPort) Set the redirect port number.voidsetRejectSuspiciousURIs(boolean rejectSuspiciousURIs) Sets whether suspicious URIs should be rejected.voidSet the scheme that will be assigned to requests received through this connector.voidsetSecure(boolean secure) Set the secure connection flag that will be assigned to requests received through this connector.voidsetService(Service service) Set theServicewith which we are associated (if any).voidsetURIEncoding(String URIEncoding) Set the URI encoding to be used for the URI.voidsetUseBodyEncodingForURI(boolean useBodyEncodingForURI) Set if the entity body encoding should be used for the URI.voidsetUseIPVHosts(boolean useIPVHosts) Enable the use of IP-based virtual hosting.voidsetXpoweredBy(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 voidBegin processing requests via this Connector.protected voidTerminate processing requests via this Connector.toString()Methods inherited from class LifecycleMBeanBase
getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister, unregisterMethods inherited from class LifecycleBase
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stop
-
Field Details
-
INTERNAL_EXECUTOR_NAME
Name used for the internal executor when no external executor is configured.- See Also:
-
service
TheServicewe are associated with (if any). -
allowBackslash
protected boolean allowBackslashIf this istruethe '\' character will be permitted as a path delimiter. If not specified, the default value offalsewill be used. -
allowTrace
protected boolean allowTraceDo we allow TRACE ? -
asyncTimeout
protected long asyncTimeoutDefault timeout for asynchronous requests (ms). -
enableLookups
protected boolean enableLookupsThe "enable DNS lookups" flag for this Connector. -
enforceEncodingInGetWriter
protected boolean enforceEncodingInGetWriterIf this istruethen a call toResponse.getWriter()if no character encoding has been specified will result in subsequent calls toResponse.getCharacterEncoding()returningISO-8859-1and theContent-Typeresponse header will include acharset=ISO-8859-1component. (SRV.15.2.22.1) If not specified, the default specification compliant value oftruewill be used. -
xpoweredBy
protected boolean xpoweredByIs generation of X-Powered-By response header enabled/disabled? -
proxyName
The 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 theHostheader is used. -
proxyPort
protected int proxyPortThe server port 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 port number specified by theportproperty is used. -
discardFacades
protected boolean discardFacadesThe flag that controls recycling of the facades of the request processing objects. If set totruethe object facades will be discarded when the request is recycled. If the security manager is enabled, this setting is ignored and object facades are always discarded. -
redirectPort
protected int redirectPortThe redirect port for non-SSL to SSL redirects. -
scheme
The request scheme that will be set on all requests received through this connector. -
secure
protected boolean secureThe secure connection flag that will be set on all requests received through this connector. -
sm
The string manager for this package. -
maxParameterCount
protected int maxParameterCountThe maximum number of parameters (GET plus POST) which will be automatically parsed by the container. 1000 by default. A value of less than 0 means no limit. -
maxPostSize
protected int maxPostSizeMaximum size of a POST which will be automatically parsed by the container. 2 MiB by default. -
maxSavePostSize
protected int maxSavePostSizeMaximum size of a POST which will be saved by the container during authentication. 4 KiB by default -
parseBodyMethods
Comma-separated list of HTTP methods that will be parsed according to POST-style rules for application/x-www-form-urlencoded request bodies. -
parseBodyMethodsSet
A Set of methods determined byparseBodyMethods. -
useIPVHosts
protected boolean useIPVHostsFlag to use IP-based virtual hosting. -
protocolHandlerClassName
Coyote Protocol handler class name. SeeConnector()for current default. -
configuredProtocol
Name of the protocol that was configured. -
protocolHandler
Coyote protocol handler. -
adapter
Coyote adapter. -
useBodyEncodingForURI
protected boolean useBodyEncodingForURIURI encoding as body.
-
-
Constructor Details
-
Connector
public Connector()Defaults to using HTTP/1.1 NIO implementation. -
Connector
Create a new Connector instance with the specified protocol.- Parameters:
protocol- The protocol to use
-
Connector
Create a new Connector instance with the specified protocol handler.- Parameters:
protocolHandler- The protocol handler to use
-
-
Method Details
-
getProperty
-
setProperty
-
getService
Returns theServicewith which this connector is associated.- Returns:
- the associated
Service, ornullif not associated
-
setService
Set theServicewith which we are associated (if any).- Parameters:
service- The service that owns this Engine
-
getAllowBackslash
public boolean getAllowBackslash()Returns whether backslash characters are allowed in URLs.- Returns:
trueif backslash characters are allowed in URLs, default isfalse
-
setAllowBackslash
public void setAllowBackslash(boolean allowBackslash) Set the allowBackslash flag.- Parameters:
allowBackslash- the new flag value
-
getAllowTrace
public boolean getAllowTrace()Returns whether the TRACE HTTP method is allowed.- Returns:
trueif the TRACE method is allowed, default isfalse
-
setAllowTrace
public void setAllowTrace(boolean allowTrace) Set the allowTrace flag, to disable or enable the TRACE HTTP method.- Parameters:
allowTrace- The new allowTrace flag
-
getAsyncTimeout
public long getAsyncTimeout()Returns the default timeout for async requests.- Returns:
- the default timeout in milliseconds
-
setAsyncTimeout
public void setAsyncTimeout(long asyncTimeout) Set the default timeout for async requests.- Parameters:
asyncTimeout- The new timeout in ms.
-
getDiscardFacades
public boolean getDiscardFacades()Returns whether the object facades are discarded.- Returns:
trueif the object facades are discarded
-
setDiscardFacades
public void setDiscardFacades(boolean discardFacades) Set the recycling strategy for the object facades.- Parameters:
discardFacades- the new value of the flag
-
getEnableLookups
public boolean getEnableLookups()Return the "enable DNS lookups" flag.- Returns:
- the "enable DNS lookups" flag
-
setEnableLookups
public void setEnableLookups(boolean enableLookups) Set the "enable DNS lookups" flag.- Parameters:
enableLookups- The new "enable DNS lookups" flag value
-
getEnforceEncodingInGetWriter
public boolean getEnforceEncodingInGetWriter()Returns whether the encoding must be enforced when calling getWriter().- Returns:
trueif the encoding must be enforced when calling getWriter()
-
setEnforceEncodingInGetWriter
public void setEnforceEncodingInGetWriter(boolean enforceEncodingInGetWriter) Set the enforceEncodingInGetWriter flag.- Parameters:
enforceEncodingInGetWriter- the new flag value
-
getMaxCookieCount
public int getMaxCookieCount()Returns the maximum number of cookies that will be accepted in a request.- Returns:
- the maximum cookie count
-
setMaxCookieCount
public void setMaxCookieCount(int maxCookieCount) Sets the maximum number of cookies that will be accepted in a request.- Parameters:
maxCookieCount- the new maximum cookie count
-
getMaxParameterCount
public int getMaxParameterCount()Returns the maximum number of parameters (GET plus POST) that will be automatically parsed by the container. A value of less than 0 means no limit.- Returns:
- the maximum parameter count
-
setMaxParameterCount
public void setMaxParameterCount(int maxParameterCount) Set the maximum number of parameters (GET plus POST) that will be automatically parsed by the container. A value of less than 0 means no limit.- Parameters:
maxParameterCount- The new setting
-
getMaxPartCount
public int getMaxPartCount()Returns the maximum number of parts that will be accepted in a multipart request.- Returns:
- the maximum part count
-
setMaxPartCount
public void setMaxPartCount(int maxPartCount) Sets the maximum number of parts that will be accepted in a multipart request.- Parameters:
maxPartCount- the new maximum part count
-
getMaxPartHeaderSize
public int getMaxPartHeaderSize()Returns the maximum size of the headers for each part in a multipart request.- Returns:
- the maximum part header size
-
setMaxPartHeaderSize
public void setMaxPartHeaderSize(int maxPartHeaderSize) Sets the maximum size of the headers for each part in a multipart request.- Parameters:
maxPartHeaderSize- the new maximum part header size
-
getMaxPostSize
public int getMaxPostSize()Returns the maximum size of a POST which will be automatically parsed by the container.- Returns:
- the maximum POST size in bytes
-
setMaxPostSize
public void setMaxPostSize(int maxPostSize) Set the maximum size of a POST which will be automatically parsed by the container.- Parameters:
maxPostSize- The new maximum size in bytes of a POST which will be automatically parsed by the container
-
getMaxSavePostSize
public int getMaxSavePostSize()Returns the maximum size of a POST which will be saved by the container during authentication.- Returns:
- the maximum saved POST size in bytes
-
setMaxSavePostSize
public void setMaxSavePostSize(int maxSavePostSize) Set the maximum size of a POST which will be saved by the container during authentication.- Parameters:
maxSavePostSize- The new maximum size in bytes of a POST which will be saved by the container during authentication.
-
getParseBodyMethods
Returns the HTTP methods which will support body parameters parsing.- Returns:
- the comma-separated list of HTTP methods
-
setParseBodyMethods
Set list of HTTP methods which should allow body parameter parsing. This defaults toPOST.- Parameters:
methods- Comma separated list of HTTP method names
-
isParseBodyMethod
Checks whether the given HTTP method is configured to allow body parameter parsing.- Parameters:
method- the HTTP method name to check- Returns:
trueif the method is in the parse body methods set
-
getNameIndex
public int getNameIndex()Returns the unique index for this connector.- Returns:
- the index
-
getPort
public int getPort()Returns the port number on which this connector is configured to listen for requests. The special value of 0 means select a random free port when the socket is bound.- Returns:
- the configured port number
-
setPort
public void setPort(int port) Set the port number on which we listen for requests.- Parameters:
port- The new port number
-
getPortOffset
public int getPortOffset()Returns the port offset to be applied to the configured port.- Returns:
- the port offset value
-
setPortOffset
public void setPortOffset(int portOffset) Sets the port offset to be applied to the configured port.- Parameters:
portOffset- the new port offset value
-
getPortWithOffset
public int getPortWithOffset()Returns the effective port number after applying the port offset.- Returns:
- the port number with offset applied
-
getLocalPort
public int getLocalPort()Returns the port number on which this connector is actually listening. If the special value forgetPort()of zero is used then this method will report the actual port bound.- Returns:
- the actual local port number
-
getProtocol
Returns the Coyote protocol handler in use.- Returns:
- the protocol string
-
getProtocolHandlerClassName
Returns the class name of the Coyote protocol handler in use.- Returns:
- the protocol handler class name
-
getProtocolHandler
Returns the protocol handler associated with the connector.- Returns:
- the protocol handler instance
-
getProxyName
Returns the proxy server name for this Connector.- Returns:
- the proxy server name
-
setProxyName
Set the proxy server name for this Connector.- Parameters:
proxyName- The new proxy server name
-
getProxyPort
public int getProxyPort()Returns the proxy server port for this Connector.- Returns:
- the proxy server port
-
setProxyPort
public void setProxyPort(int proxyPort) Set the proxy server port for this Connector.- Parameters:
proxyPort- The new proxy server port
-
getRedirectPort
public int getRedirectPort()Returns 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.- Returns:
- the redirect port number
-
setRedirectPort
public void setRedirectPort(int redirectPort) Set the redirect port number.- Parameters:
redirectPort- The redirect port number (non-SSL to SSL)
-
getRedirectPortWithOffset
public int getRedirectPortWithOffset()Returns the redirect port with the port offset applied.- Returns:
- the redirect port with offset
-
getScheme
Returns the scheme that will be assigned to requests received through this connector.- Returns:
- the scheme, default value is "http"
-
setScheme
Set the scheme that will be assigned to requests received through this connector.- Parameters:
scheme- The new scheme
-
getSecure
public boolean getSecure()Returns the secure connection flag that will be assigned to requests received through this connector.- Returns:
- the secure flag, default value is
false
-
setSecure
public void setSecure(boolean secure) Set the secure connection flag that will be assigned to requests received through this connector.- Parameters:
secure- The new secure connection flag
-
getURIEncoding
Returns the name of character encoding to be used for the URI using the original case.- Returns:
- the URI encoding name
-
getURICharset
Returns the Charset to use to convert raw URI bytes (after %nn decoding) to characters.- Returns:
- the URI charset, never null
-
setURIEncoding
Set the URI encoding to be used for the URI.- Parameters:
URIEncoding- The new URI character encoding.
-
getUseBodyEncodingForURI
public boolean getUseBodyEncodingForURI()Returns whether the entity body encoding should be used for the URI.- Returns:
trueif the entity body encoding should be used for the URI
-
setUseBodyEncodingForURI
public void setUseBodyEncodingForURI(boolean useBodyEncodingForURI) Set if the entity body encoding should be used for the URI.- Parameters:
useBodyEncodingForURI- The new value for the flag.
-
getXpoweredBy
public boolean getXpoweredBy()Indicates whether the generation of an X-Powered-By response header for Servlet-generated responses is enabled or disabled for this Connector.- Returns:
trueif generation of X-Powered-By response header is enabled, false otherwise
-
setXpoweredBy
public 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.- Parameters:
xpoweredBy- true if generation of X-Powered-By response header is to be enabled, false otherwise
-
setUseIPVHosts
public void setUseIPVHosts(boolean useIPVHosts) Enable the use of IP-based virtual hosting.- Parameters:
useIPVHosts-trueif Hosts are identified by IP,falseif Hosts are identified by name.
-
getUseIPVHosts
public boolean getUseIPVHosts()Test if IP-based virtual hosting is enabled.- Returns:
trueif IP vhosts are enabled
-
getExecutorName
Returns the name of the executor associated with this connector.- Returns:
- the executor name, or
INTERNAL_EXECUTOR_NAMEif using the internal executor
-
addSslHostConfig
Adds an SSL host configuration to this connector.- Parameters:
sslHostConfig- the SSL host configuration to add
-
findSslHostConfigs
Returns the SSL host configurations for this connector.- Returns:
- array of SSL host configurations
-
addUpgradeProtocol
Adds an upgrade protocol to this connector.- Parameters:
upgradeProtocol- the upgrade protocol to add
-
findUpgradeProtocols
Returns the registered upgrade protocols for this connector.- Returns:
- array of upgrade protocols
-
getEncodedReverseSolidusHandling
Returns the handling mode for encoded reverse solidus (backslash) characters.- Returns:
- the encoded reverse solidus handling mode as a string
-
setEncodedReverseSolidusHandling
Sets the handling mode for encoded reverse solidus (backslash) characters.- Parameters:
encodedReverseSolidusHandling- the handling mode value
-
getEncodedReverseSolidusHandlingInternal
Returns the internal handling mode for encoded reverse solidus (backslash) characters.- Returns:
- the encoded reverse solidus handling enum
-
getEncodedSolidusHandling
Returns the handling mode for encoded solidus (forward slash) characters.- Returns:
- the encoded solidus handling mode as a string
-
setEncodedSolidusHandling
Sets the handling mode for encoded solidus (forward slash) characters.- Parameters:
encodedSolidusHandling- the handling mode value
-
getEncodedSolidusHandlingInternal
Returns the internal handling mode for encoded solidus (forward slash) characters.- Returns:
- the encoded solidus handling enum
-
getRejectSuspiciousURIs
public boolean getRejectSuspiciousURIs()Returns whether suspicious URIs should be rejected.- Returns:
trueif suspicious URIs should be rejected
-
setRejectSuspiciousURIs
public void setRejectSuspiciousURIs(boolean rejectSuspiciousURIs) Sets whether suspicious URIs should be rejected.- Parameters:
rejectSuspiciousURIs-trueto reject suspicious URIs
-
createRequest
Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible Container.- Parameters:
coyoteRequest- The Coyote request with which the Request object will always be associated. In normal usage this must be non-null. In some test scenarios, it may be possible to use a null request without triggering an NPE.- Returns:
- a new Servlet request object
-
createResponse
Create and return a Response object suitable for receiving the contents of a Response from the responsible Container.- Parameters:
coyoteResponse- The Coyote request with which the Response object will always be associated. In normal usage this must be non-null. In some test scenarios, it may be possible to use a null response without triggering an NPE.- Returns:
- a new Servlet response object
-
createObjectNameKeyProperties
-
pause
public void pause()Pause the connector. -
resume
public void resume()Resume the connector. -
initInternal
Description copied from class:LifecycleBaseSubclasses implement this method to perform any instance initialisation required.- Overrides:
initInternalin classLifecycleMBeanBase- Throws:
LifecycleException- If the initialisation fails
-
startInternal
Begin processing requests via this Connector.- Specified by:
startInternalin classLifecycleBase- Throws:
LifecycleException- if a fatal startup error occurs
-
stopInternal
Terminate processing requests via this Connector.- Specified by:
stopInternalin classLifecycleBase- Throws:
LifecycleException- if a fatal shutdown error occurs
-
destroyInternal
Description copied from class:LifecycleBaseSubclasses implement this method to perform any instance destruction required.- Overrides:
destroyInternalin classLifecycleMBeanBase- Throws:
LifecycleException- If the destruction fails
-
toString
-
getDomainInternal
Description copied from class:LifecycleMBeanBaseMethod implemented by subclasses to identify the domain in which MBeans should be registered.- Specified by:
getDomainInternalin classLifecycleMBeanBase- Returns:
- The name of the domain to use to register MBeans.
-
getObjectNameKeyProperties
Description copied from class:LifecycleMBeanBaseAllow subclasses to specify the key properties component of theObjectNamethat will be used to register this component.- Specified by:
getObjectNameKeyPropertiesin classLifecycleMBeanBase- Returns:
- The string representation of the key properties component of the desired
ObjectName
-