Package org.apache.catalina.connector
Class Connector
- java.lang.Object
-
- org.apache.catalina.connector.Connector
-
- Direct Known Subclasses:
PECoyoteConnector
public class Connector extends Object implements Connector, Lifecycle
Implementation of a Coyote connector for Tomcat 5.x.- Version:
- $Revision: 1.23 $ $Date: 2007/07/09 20:46:45 $
- Author:
- Craig R. McClanahan, Remy Maucherat
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
authPassthroughEnabled
Flag indicating whether this connector is receiving its requests from a trusted intermediate serverprotected Container
container
The Container used for processing requests received by this Connector.protected String
domain
protected boolean
initialized
Has this component been initialized yet?protected LifecycleSupport
lifecycle
The lifecycle event support for this component.protected org.glassfish.grizzly.http.server.util.Mapper
mapper
Mapper.protected int
maxSavePostSize
Maximum size of a POST which will be saved by the container during authentication.protected int
minProcessors
The minimum number of processors to start at initialization time.protected ObjectName
oname
protected ProxyHandler
proxyHandler
-
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT
-
-
Constructor Summary
Constructors Constructor Description Connector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component.protected ObjectName
createObjectName(String domain, 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.void
destroy()
List<LifecycleListener>
findLifecycleListeners()
Gets the (possibly empty) list of lifecycle listeners associated with this Connector.int
getAcceptCount()
Return the accept count for this Connector.String
getAddress()
Return the bind IP address for this Connector.boolean
getAllowTrace()
True if the TRACE method is allowed.boolean
getAuthPassthroughEnabled()
Returns the value of this connector's authPassthroughEnabled flag.boolean
getBlocking()
Return the blocking connection flag that will be assigned to requests received through this connector.int
getBufferSize()
Return the input buffer size for this Connector.X509Certificate[]
getCertificates(Request request)
Get the underlying WebContainer certificate for the requestString
getCiphers()
Gets the list of SSL cipher suites that are to be enabledboolean
getClientAuth()
String
getCompression()
Get the value of compression.int
getConnectionLinger()
Return the connection linger for this Connector.int
getConnectionTimeout()
Return the connection timeout for this Connector.int
getConnectionUploadTimeout()
Return the connection upload timeout for this Connector.Container
getContainer()
Return the Container used for processing requests received by this Connector.ObjectName
getController()
int
getDebug()
Return the debugging detail level for this component.String
getDefaultHost()
Gets the default host of this Connector.boolean
getDisableUploadTimeout()
Return the flag that specifies upload time-out behavior.String
getDomain()
boolean
getEnableLookups()
Return the "enable DNS lookups" flag.ServerSocketFactory
getFactory()
Return the server socket factory used by this Container.org.glassfish.grizzly.http.server.HttpHandler
getHandler()
Get theAdapter
used by this connector.String
getInfo()
Return descriptive information about this Connector implementation.String
getInstanceName()
String
getJvmRoute()
Get the jvmRoute associated with this connector.boolean
getKeepAlive()
Return the Keep-Alive policy for the connection.String
getKeyAlias()
Gets the alias name of the keypair and supporting certificate chain used by this Connector to authenticate itself to SSL clients.String
getKeystoreFile()
String
getKeystorePass()
Return keystorePassorg.glassfish.grizzly.http.server.util.Mapper
getMapper()
Return the mapper.int
getMaxHttpHeaderSize()
Return the maximum HTTP header size.int
getMaxKeepAliveRequests()
Return the maximum number of Keep-Alive requests to honor per connection.int
getMaxPostSize()
Return the maximum size of a POST which will be automatically parsed by the container.int
getMaxProcessors()
Return the maximum number of processors allowed, or <0 for unlimited.int
getMaxSavePostSize()
Return the maximum size of a POST which will be saved by the container during authentication.int
getMinProcessors()
Return the minimum number of processors to start at initialization.String
getName()
Gets the name of this Connector.ObjectName
getObjectName()
int
getPort()
Return the port number on which we listen for requests.String
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.ProxyHandler
getProxyHandler()
Gets the ProxyHandler instance associated with this CoyoteConnector.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.String
getSelectorThreadImpl()
Get the underlyingSelectorThread
implementation, null if the default is used.int
getServerSocketTimeout()
Return the server socket timeout for this Connector.Service
getService()
Return theService
with which we are associated (if any).String
getSsl3SessionTimeout()
String
getSslProtocol()
Gets the SSL protocol variant to be used.String
getSslProtocols()
Gets the SSL protocol variants to be enabled.String
getSslSessionCacheSize()
String
getSslSessionTimeout()
boolean
getTcpNoDelay()
Return the TCP no delay flag value.boolean
getTomcatAuthentication()
String
getURIEncoding()
Return the character encoding to be used for the URI.void
init()
void
initialize()
Initialize this connector (create ServerSocket here!)boolean
isAvailable()
Is this connector available for processing requests?boolean
isEnabled()
boolean
isServerHeader()
Indicates whether the generation of a Server response header for servlet-generated responses is enabled or disabled for this Connector.boolean
isXframeOptions()
Indicates whether the generation of an X-Frame-Options response header for servlet-generated responses is enabled or disabled for this Connector.boolean
isXpoweredBy()
Indicates whether the generation of an X-Powered-By response header for servlet-generated responses is enabled or disabled for this Connector.void
removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component.void
removeProperty(String name)
remove a configured property.void
requestEndEvent(jakarta.servlet.http.HttpServletRequest request, Host host, Context context, int statusCode)
Fires probe event related to the fact that the given request is about to exit from the web container.void
requestStartEvent(jakarta.servlet.http.HttpServletRequest request, Host host, Context context)
Fires probe event related to the fact that the given request has been entered the web container.void
setAcceptCount(int count)
Set the accept count for this Connector.void
setAddress(String address)
Set the bind IP address for this Connector.void
setAllowTrace(boolean allowTrace)
Set the allowTrace flag, to disable or enable the TRACE HTTP method.void
setAuthPassthroughEnabled(boolean authPassthroughEnabled)
Sets the value of this connector's authPassthroughEnabled flag.void
setBlocking(boolean blocking)
Set the blocking connection flag that will be assigned to requests received through this connector.void
setBufferSize(int bufferSize)
Set the input buffer size for this Connector.void
setCiphers(String ciphers)
Sets the SSL cipher suites that are to be enabled.void
setClientAuth(boolean clientAuth)
void
setCompression(String compression)
Set the value of compression.void
setConnectionLinger(int connectionLinger)
Set the connection linger for this Connector.void
setConnectionTimeout(int connectionTimeout)
Set the connection timeout for this Connector.void
setConnectionUploadTimeout(int connectionUploadTimeout)
Set the connection upload timeout for this Connector.void
setContainer(Container container)
Set the Container used for processing requests received by this Connector.void
setController(ObjectName controller)
void
setDebug(int debug)
Set the debugging detail level for this component.void
setDefaultHost(String defaultHost)
Sets the default host for this Connector.void
setDisableUploadTimeout(boolean isDisabled)
Set the flag to specify upload time-out behavior.void
setDomain(String domain)
Set the domain of this object.void
setEnabled(boolean enabled)
void
setEnableLookups(boolean enableLookups)
Set the "enable DNS lookups" flag.void
setFactory(ServerSocketFactory factory)
Set the server socket factory used by this Container.void
setHandler(org.glassfish.grizzly.http.server.HttpHandler handler)
Set theAdapter
used by this connector.void
setInstanceName(String instanceName)
Sets the instance name for this Connector.void
setJvmRoute(String jvmRoute)
Sets the jvmRoute associated with this connector.void
setKeepAlive(boolean keepAlive)
Set the keep-alive policy for this connection.void
setKeyAlias(String alias)
Sets the alias name of the keypair and supporting certificate chain used by this Connector to authenticate itself to SSL clients.void
setKeystoreFile(String keystoreFile)
void
setKeystorePass(String keystorePass)
Set keystorePassvoid
setMapper(org.glassfish.grizzly.http.server.util.Mapper mapper)
Set theMapper
.void
setMaxHttpHeaderSize(int size)
Set the maximum HTTP header size.void
setMaxKeepAliveRequests(int mkar)
Set the maximum number of Keep-Alive requests to honor per connection.void
setMaxPostSize(int maxPostSize)
Set the maximum size of a POST which will be automatically parsed by the container.void
setMaxProcessors(int maxProcessors)
Set the maximum number of processors allowed, or <0 for unlimited.void
setMaxSavePostSize(int maxSavePostSize)
Set the maximum size of a POST which will be saved by the container during authentication.void
setMinProcessors(int minProcessors)
Set the minimum number of processors to start at initialization.void
setName(String name)
Sets the name of this Connector.void
setPort(int port)
Set the port number on which we listen for requests.void
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
setProtocolHandler(ProtocolHandler protocolHandler)
Set theProtocolHandler
used by this connector.void
setProtocolHandlerClassName(String protocolHandlerClassName)
Set the class name of the Coyote protocol handler which will be used by the connector.void
setProxyHandler(ProxyHandler proxyHandler)
Sets the ProxyHandler implementation for this CoyoteConnector to use.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
setSelectorThreadImpl(String selectorThreadImpl)
Set the underlyingSelectorThread
implementationvoid
setServerHeader(boolean serverHeader)
Enables or disables the generation of a Server header (with value Servlet/2.4) for all servlet-generated responses returned by this Connector.void
setServerSocketTimeout(int serverSocketTimeout)
Set the server socket timeout for this Connector.void
setService(Service service)
Set theService
with which we are associated (if any).void
setSsl3SessionTimeout(String timeout)
Sets the number of seconds after which SSL3 sessions expire and are removed from the SSL sessions cache.void
setSslProtocol(String sslProtocol)
Sets the SSL protocol variant to be used.void
setSslProtocols(String sslProtocols)
Sets the SSL protocol variants to be enabled.void
setSslSessionCacheSize(String cacheSize)
Sets the number of SSL sessions that may be cachedvoid
setSslSessionTimeout(String timeout)
Sets the number of seconds after which SSL sessions expire and are removed from the SSL sessions cache.void
setTcpNoDelay(boolean tcpNoDelay)
Set the TCP no delay flag which will be set on the socket after accepting a connection.void
setTomcatAuthentication(boolean tomcatAuthentication)
void
setURIEncoding(String uriEncoding)
Set the URI encoding to be used for the URI.void
setXframeOptions(boolean xframeOptions)
Enables or disables the generation of an X-Frame-Options header (with value Servlet/2.4) for all servlet-generated responses returned by this Connector.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.void
start()
Begin processing requests via this Connector.void
stop()
Terminate processing requests via this Connector.
-
-
-
Field Detail
-
container
protected Container container
The Container used for processing requests received by this Connector.
-
lifecycle
protected LifecycleSupport lifecycle
The lifecycle event support for this component.
-
minProcessors
protected int minProcessors
The minimum number of processors to start at initialization time.
-
maxSavePostSize
protected int maxSavePostSize
Maximum size of a POST which will be saved by the container during authentication. 4kB by default
-
initialized
protected boolean initialized
Has this component been initialized yet?
-
mapper
protected org.glassfish.grizzly.http.server.util.Mapper mapper
Mapper.
-
authPassthroughEnabled
protected boolean authPassthroughEnabled
Flag indicating whether this connector is receiving its requests from a trusted intermediate server
-
proxyHandler
protected ProxyHandler proxyHandler
-
domain
protected String domain
-
oname
protected ObjectName oname
-
-
Method Detail
-
removeProperty
public void removeProperty(String name)
remove a configured property.
-
getService
public Service getService()
Return theService
with which we are associated (if any).- Specified by:
getService
in interfaceConnector
-
setService
public void setService(Service service)
Set theService
with which we are associated (if any).- Specified by:
setService
in interfaceConnector
- Parameters:
service
- The service that owns this Engine
-
getCompression
public String getCompression()
Get the value of compression.
-
setCompression
public void setCompression(String compression)
Set the value of compression.- Parameters:
compression
- The new compression value, which can be "on", "off" or "force"
-
getConnectionLinger
public int getConnectionLinger()
Return the connection linger for this Connector.
-
setConnectionLinger
public void setConnectionLinger(int connectionLinger)
Set the connection linger for this Connector.- Parameters:
connectionLinger
- The new connection linger
-
getConnectionTimeout
public int getConnectionTimeout()
Return the connection timeout for this Connector.
-
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout)
Set the connection timeout for this Connector.- Parameters:
connectionTimeout
- The new connection timeout
-
getConnectionUploadTimeout
public int getConnectionUploadTimeout()
Return the connection upload timeout for this Connector.
-
setConnectionUploadTimeout
public void setConnectionUploadTimeout(int connectionUploadTimeout)
Set the connection upload timeout for this Connector.- Parameters:
connectionUploadTimeout
- The new connection upload timeout
-
getServerSocketTimeout
public int getServerSocketTimeout()
Return the server socket timeout for this Connector.
-
setServerSocketTimeout
public void setServerSocketTimeout(int serverSocketTimeout)
Set the server socket timeout for this Connector.- Parameters:
serverSocketTimeout
- The new server socket timeout
-
getAcceptCount
public int getAcceptCount()
Return the accept count for this Connector.
-
setAcceptCount
public void setAcceptCount(int count)
Set the accept count for this Connector.- Parameters:
count
- The new accept count
-
getAddress
public String getAddress()
Return the bind IP address for this Connector.
-
setAddress
public void setAddress(String address)
Set the bind IP address for this Connector.- Parameters:
address
- The bind IP address
-
getAllowTrace
public boolean getAllowTrace()
True if the TRACE method is allowed. Default value is "false".
-
setAllowTrace
public void setAllowTrace(boolean allowTrace)
Set the allowTrace flag, to disable or enable the TRACE HTTP method.- Parameters:
allowTrace
- The new allowTrace flag
-
isAvailable
public boolean isAvailable()
Is this connector available for processing requests?
-
getBufferSize
public int getBufferSize()
Return the input buffer size for this Connector.
-
setBufferSize
public void setBufferSize(int bufferSize)
Set the input buffer size for this Connector.- Parameters:
bufferSize
- The new input buffer size.
-
getContainer
public Container getContainer()
Return the Container used for processing requests received by this Connector.- Specified by:
getContainer
in interfaceConnector
-
setContainer
public void setContainer(Container container)
Set the Container used for processing requests received by this Connector.- Specified by:
setContainer
in interfaceConnector
- Parameters:
container
- The new Container to use
-
getDebug
public int getDebug()
Return the debugging detail level for this component.
-
setDebug
public void setDebug(int debug)
Set the debugging detail level for this component.- Parameters:
debug
- The new debugging detail level
-
getEnableLookups
public boolean getEnableLookups()
Return the "enable DNS lookups" flag.- Specified by:
getEnableLookups
in interfaceConnector
-
setEnableLookups
public void setEnableLookups(boolean enableLookups)
Set the "enable DNS lookups" flag.- Specified by:
setEnableLookups
in interfaceConnector
- Parameters:
enableLookups
- The new "enable DNS lookups" flag value
-
getFactory
public ServerSocketFactory getFactory()
Return the server socket factory used by this Container.- Specified by:
getFactory
in interfaceConnector
-
setFactory
public void setFactory(ServerSocketFactory factory)
Set the server socket factory used by this Container.- Specified by:
setFactory
in interfaceConnector
- Parameters:
factory
- The new server socket factory
-
getInfo
public String getInfo()
Return descriptive information about this Connector implementation.
-
getMapper
public org.glassfish.grizzly.http.server.util.Mapper getMapper()
Return the mapper.
-
setMapper
public void setMapper(org.glassfish.grizzly.http.server.util.Mapper mapper)
Set theMapper
.- Parameters:
mapper
-
-
getMinProcessors
public int getMinProcessors()
Return the minimum number of processors to start at initialization.
-
setMinProcessors
public void setMinProcessors(int minProcessors)
Set the minimum number of processors to start at initialization.- Parameters:
minProcessors
- The new minimum processors
-
getMaxProcessors
public int getMaxProcessors()
Return the maximum number of processors allowed, or <0 for unlimited.
-
setMaxProcessors
public void setMaxProcessors(int maxProcessors)
Set the maximum number of processors allowed, or <0 for unlimited.- Parameters:
maxProcessors
- The new maximum processors
-
getMaxPostSize
public int getMaxPostSize()
Return the maximum size of a POST which will be automatically parsed by the container.
-
setMaxPostSize
public void setMaxPostSize(int maxPostSize)
Set the maximum size of a POST which will be automatically parsed by the container.- Specified by:
setMaxPostSize
in interfaceConnector
- Parameters:
maxPostSize
- The new maximum size in bytes of a POST which will be automatically parsed by the container
-
getMaxSavePostSize
public int getMaxSavePostSize()
Return the maximum size of a POST which will be saved by the container during authentication.- Specified by:
getMaxSavePostSize
in interfaceConnector
- Returns:
- maximum 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.
-
getPort
public int getPort()
Return the port number on which we listen for requests.
-
setPort
public void setPort(int port)
Set the port number on which we listen for requests.- Parameters:
port
- The new port number
-
setName
public void setName(String name)
Sets the name of this Connector.
-
getName
public String getName()
Gets the name of this Connector.
-
setInstanceName
public void setInstanceName(String instanceName)
Sets the instance name for this Connector.- Parameters:
instanceName
- the instance name
-
getInstanceName
public String getInstanceName()
-
getProtocol
public String getProtocol()
Return the Coyote protocol handler in use.
-
setProtocol
public void setProtocol(String protocol)
Set the Coyote protocol which will be used by the connector.- Parameters:
protocol
- The Coyote protocol name
-
getProtocolHandlerClassName
public String getProtocolHandlerClassName()
Return the class name of the Coyote protocol handler in use.
-
setProtocolHandlerClassName
public void setProtocolHandlerClassName(String protocolHandlerClassName)
Set the class name of the Coyote protocol handler which will be used by the connector.- Parameters:
protocolHandlerClassName
- The new class name
-
getProtocolHandler
public ProtocolHandler getProtocolHandler()
Return the protocol handler associated with the connector.
-
getProxyName
public String getProxyName()
Return the proxy server name for this Connector.
-
setProxyName
public void setProxyName(String proxyName)
Set the proxy server name for this Connector.- Parameters:
proxyName
- The new proxy server name
-
getProxyPort
public int getProxyPort()
Return the proxy server port for this Connector.
-
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()
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.- Specified by:
getRedirectPort
in interfaceConnector
-
setRedirectPort
public void setRedirectPort(int redirectPort)
Set the redirect port number.- Specified by:
setRedirectPort
in interfaceConnector
- Parameters:
redirectPort
- The redirect port number (non-SSL to SSL)
-
getDisableUploadTimeout
public boolean getDisableUploadTimeout()
Return the flag that specifies upload time-out behavior.
-
setDisableUploadTimeout
public void setDisableUploadTimeout(boolean isDisabled)
Set the flag to specify upload time-out behavior.- Parameters:
isDisabled
- Iftrue
, then thetimeout
parameter is ignored. Iffalse
, then thetimeout
parameter is used to control uploads.
-
getMaxHttpHeaderSize
public int getMaxHttpHeaderSize()
Return the maximum HTTP header size.
-
setMaxHttpHeaderSize
public void setMaxHttpHeaderSize(int size)
Set the maximum HTTP header size.
-
getKeepAlive
public boolean getKeepAlive()
Return the Keep-Alive policy for the connection.
-
setKeepAlive
public void setKeepAlive(boolean keepAlive)
Set the keep-alive policy for this connection.
-
getMaxKeepAliveRequests
public int getMaxKeepAliveRequests()
Return the maximum number of Keep-Alive requests to honor per connection.
-
setMaxKeepAliveRequests
public void setMaxKeepAliveRequests(int mkar)
Set the maximum number of Keep-Alive requests to honor per connection.
-
getScheme
public String getScheme()
Return the scheme that will be assigned to requests received through this connector. Default value is "http".
-
setScheme
public void setScheme(String scheme)
Set the scheme that will be assigned to requests received through this connector.
-
getSecure
public boolean getSecure()
Return the secure connection flag that will be assigned to requests received through this connector. 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.
-
getBlocking
public boolean getBlocking()
Return the blocking connection flag that will be assigned to requests received through this connector. Default value is "false".
-
setBlocking
public void setBlocking(boolean blocking)
Set the blocking connection flag that will be assigned to requests received through this connector.- Parameters:
blocking
- The new blocking connection flag
-
getTomcatAuthentication
public boolean getTomcatAuthentication()
-
setTomcatAuthentication
public void setTomcatAuthentication(boolean tomcatAuthentication)
-
getTcpNoDelay
public boolean getTcpNoDelay()
Return the TCP no delay flag value.
-
setTcpNoDelay
public void setTcpNoDelay(boolean tcpNoDelay)
Set the TCP no delay flag which will be set on the socket after accepting a connection.- Parameters:
tcpNoDelay
- The new TCP no delay flag
-
getURIEncoding
public String getURIEncoding()
Return the character encoding to be used for the URI.- Specified by:
getURIEncoding
in interfaceConnector
-
setURIEncoding
public void setURIEncoding(String uriEncoding)
Set the URI encoding to be used for the URI.- Specified by:
setURIEncoding
in interfaceConnector
- Parameters:
uriEncoding
- The new URI character encoding.
-
isXpoweredBy
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.- Returns:
- true if 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.4) 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
-
isServerHeader
public boolean isServerHeader()
Indicates whether the generation of a Server response header for servlet-generated responses is enabled or disabled for this Connector.- Returns:
- true if generation of Server response header is enabled, false otherwise
-
setServerHeader
public void setServerHeader(boolean serverHeader)
Enables or disables the generation of a Server header (with value Servlet/2.4) for all servlet-generated responses returned by this Connector.- Parameters:
serverHeader
- true if generation of Server response header is to be enabled, false otherwise
-
isXframeOptions
public boolean isXframeOptions()
Indicates whether the generation of an X-Frame-Options response header for servlet-generated responses is enabled or disabled for this Connector.- Returns:
- true if generation of X-Frame-Options response header is enabled, false otherwise
-
setXframeOptions
public void setXframeOptions(boolean xframeOptions)
Enables or disables the generation of an X-Frame-Options header (with value Servlet/2.4) for all servlet-generated responses returned by this Connector.- Parameters:
xframeOptions
- true if generation of X-Frame-Options response header is to be enabled, false otherwise
-
setDefaultHost
public void setDefaultHost(String defaultHost)
Sets the default host for this Connector.- Specified by:
setDefaultHost
in interfaceConnector
- Parameters:
defaultHost
- The default host for this Connector
-
getDefaultHost
public String getDefaultHost()
Gets the default host of this Connector.- Specified by:
getDefaultHost
in interfaceConnector
- Returns:
- The default host of this Connector
-
getAuthPassthroughEnabled
public boolean getAuthPassthroughEnabled()
Returns the value of this connector's authPassthroughEnabled flag.- Specified by:
getAuthPassthroughEnabled
in interfaceConnector
- Returns:
- true if this connector is receiving its requests from a trusted intermediate server, false otherwise
-
setAuthPassthroughEnabled
public void setAuthPassthroughEnabled(boolean authPassthroughEnabled)
Sets the value of this connector's authPassthroughEnabled flag.- Specified by:
setAuthPassthroughEnabled
in interfaceConnector
- Parameters:
authPassthroughEnabled
- true if this connector is receiving its requests from a trusted intermediate server, false otherwise
-
getProxyHandler
public ProxyHandler getProxyHandler()
Gets the ProxyHandler instance associated with this CoyoteConnector.- Specified by:
getProxyHandler
in interfaceConnector
- Returns:
- ProxyHandler instance associated with this CoyoteConnector, or null
-
setProxyHandler
public void setProxyHandler(ProxyHandler proxyHandler)
Sets the ProxyHandler implementation for this CoyoteConnector to use.- Specified by:
setProxyHandler
in interfaceConnector
- Parameters:
proxyHandler
- ProxyHandler instance to use
-
setEnabled
public void setEnabled(boolean enabled)
-
isEnabled
public boolean isEnabled()
-
setJvmRoute
public void setJvmRoute(String jvmRoute)
Description copied from interface:Connector
Sets the jvmRoute associated with this connector.- Specified by:
setJvmRoute
in interfaceConnector
-
getJvmRoute
public String getJvmRoute()
Description copied from interface:Connector
Get the jvmRoute associated with this connector.- Specified by:
getJvmRoute
in interfaceConnector
-
createRequest
public Request createRequest()
Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible Container.- Specified by:
createRequest
in interfaceConnector
-
createResponse
public Response createResponse()
Create (or allocate) and return a Response object suitable for receiving the contents of a Response from the responsible Container.- Specified by:
createResponse
in interfaceConnector
-
requestStartEvent
public void requestStartEvent(jakarta.servlet.http.HttpServletRequest request, Host host, Context context)
Fires probe event related to the fact that the given request has been entered the web container.- Parameters:
request
- the request objecthost
- the virtual server to which the request was mappedcontext
- the Context to which the request was mapped
-
requestEndEvent
public void requestEndEvent(jakarta.servlet.http.HttpServletRequest request, Host host, Context context, int statusCode)
Fires probe event related to the fact that the given request is about to exit from the web container.- Parameters:
request
- the request objecthost
- the virtual server to which the request was mappedcontext
- the Context to which the request was mappedstatusCode
- the response status code
-
addLifecycleListener
public void addLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component.- Specified by:
addLifecycleListener
in interfaceLifecycle
- Parameters:
listener
- The listener to add
-
findLifecycleListeners
public List<LifecycleListener> findLifecycleListeners()
Gets the (possibly empty) list of lifecycle listeners associated with this Connector.- Specified by:
findLifecycleListeners
in interfaceLifecycle
-
removeLifecycleListener
public void removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component.- Specified by:
removeLifecycleListener
in interfaceLifecycle
- Parameters:
listener
- The listener to add
-
createObjectName
protected ObjectName createObjectName(String domain, String type) throws MalformedObjectNameException
- Throws:
MalformedObjectNameException
-
initialize
public void initialize() throws LifecycleException
Initialize this connector (create ServerSocket here!)- Specified by:
initialize
in interfaceConnector
- Throws:
LifecycleException
- If this server was already initialized.
-
start
public void start() throws LifecycleException
Begin processing requests via this Connector.- Specified by:
start
in interfaceLifecycle
- Throws:
LifecycleException
- if a fatal startup error occurs
-
stop
public void stop() throws LifecycleException
Terminate processing requests via this Connector.- Specified by:
stop
in interfaceLifecycle
- Throws:
LifecycleException
- if a fatal shutdown error occurs
-
getClientAuth
public boolean getClientAuth()
-
setClientAuth
public void setClientAuth(boolean clientAuth)
-
getKeystoreFile
public String getKeystoreFile()
-
setKeystoreFile
public void setKeystoreFile(String keystoreFile)
-
getKeystorePass
public String getKeystorePass()
Return keystorePass
-
setKeystorePass
public void setKeystorePass(String keystorePass)
Set keystorePass
-
getCiphers
public String getCiphers()
Gets the list of SSL cipher suites that are to be enabled- Returns:
- Comma-separated list of SSL cipher suites, or null if all cipher suites supported by the underlying SSL implementation are being enabled
-
setCiphers
public void setCiphers(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.- Parameters:
ciphers
- Comma-separated list of SSL cipher suites
-
setSslSessionTimeout
public void setSslSessionTimeout(String timeout)
Sets the number of seconds after which SSL sessions expire and are removed from the SSL sessions cache.
-
getSslSessionTimeout
public String getSslSessionTimeout()
-
setSsl3SessionTimeout
public void setSsl3SessionTimeout(String timeout)
Sets the number of seconds after which SSL3 sessions expire and are removed from the SSL sessions cache.
-
getSsl3SessionTimeout
public String getSsl3SessionTimeout()
-
setSslSessionCacheSize
public void setSslSessionCacheSize(String cacheSize)
Sets the number of SSL sessions that may be cached
-
getSslSessionCacheSize
public String getSslSessionCacheSize()
-
getKeyAlias
public String getKeyAlias()
Gets the alias name of the keypair and supporting certificate chain used by this Connector to authenticate itself to SSL clients.- Returns:
- The alias name of the keypair and supporting certificate chain
-
setKeyAlias
public void setKeyAlias(String alias)
Sets the alias name of the keypair and supporting certificate chain used by this Connector to authenticate itself to SSL clients.- Parameters:
alias
- The alias name of the keypair and supporting certificate chain
-
getSslProtocol
public String getSslProtocol()
Gets the SSL protocol variant to be used.- Returns:
- SSL protocol variant
-
setSslProtocol
public void setSslProtocol(String sslProtocol)
Sets the SSL protocol variant to be used.- Parameters:
sslProtocol
- SSL protocol variant
-
getSslProtocols
public String getSslProtocols()
Gets the SSL protocol variants to be enabled.- Returns:
- Comma-separated list of SSL protocol variants
-
setSslProtocols
public void setSslProtocols(String sslProtocols)
Sets the SSL protocol variants to be enabled.- Parameters:
sslProtocols
- Comma-separated list of SSL protocol variants
-
getCertificates
public X509Certificate[] getCertificates(Request request)
Get the underlying WebContainer certificate for the request- Specified by:
getCertificates
in interfaceConnector
-
getController
public ObjectName getController()
-
setController
public void setController(ObjectName controller)
-
getObjectName
public ObjectName getObjectName()
-
getDomain
public String getDomain()
-
setDomain
public void setDomain(String domain)
Set the domain of this object.
-
setHandler
public void setHandler(org.glassfish.grizzly.http.server.HttpHandler handler)
Set theAdapter
used by this connector.- Specified by:
setHandler
in interfaceConnector
-
getHandler
public org.glassfish.grizzly.http.server.HttpHandler getHandler()
Get theAdapter
used by this connector.- Specified by:
getHandler
in interfaceConnector
-
setProtocolHandler
public void setProtocolHandler(ProtocolHandler protocolHandler)
Set theProtocolHandler
used by this connector.
-
getSelectorThreadImpl
public String getSelectorThreadImpl()
Get the underlyingSelectorThread
implementation, null if the default is used.
-
setSelectorThreadImpl
public void setSelectorThreadImpl(String selectorThreadImpl)
Set the underlyingSelectorThread
implementation
-
-