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 booleanauthPassthroughEnabledFlag indicating whether this connector is receiving its requests from a trusted intermediate serverprotected ContainercontainerThe Container used for processing requests received by this Connector.protected Stringdomainprotected booleaninitializedHas this component been initialized yet?protected LifecycleSupportlifecycleThe lifecycle event support for this component.protected org.glassfish.grizzly.http.server.util.MappermapperMapper.protected intmaxSavePostSizeMaximum size of a POST which will be saved by the container during authentication.protected intminProcessorsThe minimum number of processors to start at initialization time.protected ObjectNameonameprotected ProxyHandlerproxyHandler-
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 voidaddLifecycleListener(LifecycleListener listener)Add a lifecycle event listener to this component.protected ObjectNamecreateObjectName(String domain, String type)RequestcreateRequest()Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible Container.ResponsecreateResponse()Create (or allocate) and return a Response object suitable for receiving the contents of a Response from the responsible Container.voiddestroy()List<LifecycleListener>findLifecycleListeners()Gets the (possibly empty) list of lifecycle listeners associated with this Connector.intgetAcceptCount()Return the accept count for this Connector.StringgetAddress()Return the bind IP address for this Connector.booleangetAllowTrace()True if the TRACE method is allowed.booleangetAuthPassthroughEnabled()Returns the value of this connector's authPassthroughEnabled flag.booleangetBlocking()Return the blocking connection flag that will be assigned to requests received through this connector.intgetBufferSize()Return the input buffer size for this Connector.X509Certificate[]getCertificates(Request request)Get the underlying WebContainer certificate for the requestStringgetCiphers()Gets the list of SSL cipher suites that are to be enabledbooleangetClientAuth()StringgetCompression()Get the value of compression.intgetConnectionLinger()Return the connection linger for this Connector.intgetConnectionTimeout()Return the connection timeout for this Connector.intgetConnectionUploadTimeout()Return the connection upload timeout for this Connector.ContainergetContainer()Return the Container used for processing requests received by this Connector.ObjectNamegetController()intgetDebug()Return the debugging detail level for this component.StringgetDefaultHost()Gets the default host of this Connector.booleangetDisableUploadTimeout()Return the flag that specifies upload time-out behavior.StringgetDomain()booleangetEnableLookups()Return the "enable DNS lookups" flag.ServerSocketFactorygetFactory()Return the server socket factory used by this Container.org.glassfish.grizzly.http.server.HttpHandlergetHandler()Get theAdapterused by this connector.StringgetInfo()Return descriptive information about this Connector implementation.StringgetInstanceName()StringgetJvmRoute()Get the jvmRoute associated with this connector.booleangetKeepAlive()Return the Keep-Alive policy for the connection.StringgetKeyAlias()Gets the alias name of the keypair and supporting certificate chain used by this Connector to authenticate itself to SSL clients.StringgetKeystoreFile()StringgetKeystorePass()Return keystorePassorg.glassfish.grizzly.http.server.util.MappergetMapper()Return the mapper.intgetMaxHttpHeaderSize()Return the maximum HTTP header size.intgetMaxKeepAliveRequests()Return the maximum number of Keep-Alive requests to honor per connection.intgetMaxPostSize()Return the maximum size of a POST which will be automatically parsed by the container.intgetMaxProcessors()Return the maximum number of processors allowed, or <0 for unlimited.intgetMaxSavePostSize()Return the maximum size of a POST which will be saved by the container during authentication.intgetMinProcessors()Return the minimum number of processors to start at initialization.StringgetName()Gets the name of this Connector.ObjectNamegetObjectName()intgetPort()Return the port number on which we listen for requests.StringgetProperty(String name)Return a configured property.StringgetProtocol()Return the Coyote protocol handler in use.ProtocolHandlergetProtocolHandler()Return the protocol handler associated with the connector.StringgetProtocolHandlerClassName()Return the class name of the Coyote protocol handler in use.ProxyHandlergetProxyHandler()Gets the ProxyHandler instance associated with this CoyoteConnector.StringgetProxyName()Return the proxy server name for this Connector.intgetProxyPort()Return the proxy server port for this Connector.intgetRedirectPort()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.StringgetScheme()Return the scheme that will be assigned to requests received through this connector.booleangetSecure()Return the secure connection flag that will be assigned to requests received through this connector.StringgetSelectorThreadImpl()Get the underlyingSelectorThreadimplementation, null if the default is used.intgetServerSocketTimeout()Return the server socket timeout for this Connector.ServicegetService()Return theServicewith which we are associated (if any).StringgetSslProtocol()Gets the SSL protocol variant to be used.StringgetSslProtocols()Gets the SSL protocol variants to be enabled.booleangetTcpNoDelay()Return the TCP no delay flag value.booleangetTomcatAuthentication()StringgetURIEncoding()Return the character encoding to be used for the URI.voidinit()voidinitialize()Initialize this connector (create ServerSocket here!)booleanisAvailable()Is this connector available for processing requests?booleanisEnabled()booleanisServerHeader()Indicates whether the generation of a Server response header for servlet-generated responses is enabled or disabled for this Connector.booleanisXframeOptions()Indicates whether the generation of an X-Frame-Options response header for servlet-generated responses is enabled or disabled for this Connector.booleanisXpoweredBy()Indicates whether the generation of an X-Powered-By response header for servlet-generated responses is enabled or disabled for this Connector.voidremoveLifecycleListener(LifecycleListener listener)Remove a lifecycle event listener from this component.voidremoveProperty(String name)remove a configured property.voidrequestEndEvent(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.voidrequestStartEvent(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.voidsetAcceptCount(int count)Set the accept count for this Connector.voidsetAddress(String address)Set the bind IP address for this Connector.voidsetAllowTrace(boolean allowTrace)Set the allowTrace flag, to disable or enable the TRACE HTTP method.voidsetAuthPassthroughEnabled(boolean authPassthroughEnabled)Sets the value of this connector's authPassthroughEnabled flag.voidsetBlocking(boolean blocking)Set the blocking connection flag that will be assigned to requests received through this connector.voidsetBufferSize(int bufferSize)Set the input buffer size for this Connector.voidsetCiphers(String ciphers)Sets the SSL cipher suites that are to be enabled.voidsetClientAuth(boolean clientAuth)voidsetCompression(String compression)Set the value of compression.voidsetConnectionLinger(int connectionLinger)Set the connection linger for this Connector.voidsetConnectionTimeout(int connectionTimeout)Set the connection timeout for this Connector.voidsetConnectionUploadTimeout(int connectionUploadTimeout)Set the connection upload timeout for this Connector.voidsetContainer(Container container)Set the Container used for processing requests received by this Connector.voidsetController(ObjectName controller)voidsetDebug(int debug)Set the debugging detail level for this component.voidsetDefaultHost(String defaultHost)Sets the default host for this Connector.voidsetDisableUploadTimeout(boolean isDisabled)Set the flag to specify upload time-out behavior.voidsetDomain(String domain)Set the domain of this object.voidsetEnabled(boolean enabled)voidsetEnableLookups(boolean enableLookups)Set the "enable DNS lookups" flag.voidsetFactory(ServerSocketFactory factory)Set the server socket factory used by this Container.voidsetHandler(org.glassfish.grizzly.http.server.HttpHandler handler)Set theAdapterused by this connector.voidsetInstanceName(String instanceName)Sets the instance name for this Connector.voidsetJvmRoute(String jvmRoute)Sets the jvmRoute associated with this connector.voidsetKeepAlive(boolean keepAlive)Set the keep-alive policy for this connection.voidsetKeyAlias(String alias)Sets the alias name of the keypair and supporting certificate chain used by this Connector to authenticate itself to SSL clients.voidsetKeystoreFile(String keystoreFile)voidsetKeystorePass(String keystorePass)Set keystorePassvoidsetMapper(org.glassfish.grizzly.http.server.util.Mapper mapper)Set theMapper.voidsetMaxHttpHeaderSize(int size)Set the maximum HTTP header size.voidsetMaxKeepAliveRequests(int mkar)Set the maximum number of Keep-Alive requests to honor per connection.voidsetMaxPostSize(int maxPostSize)Set the maximum size of a POST which will be automatically parsed by the container.voidsetMaxProcessors(int maxProcessors)Set the maximum number of processors allowed, or <0 for unlimited.voidsetMaxSavePostSize(int maxSavePostSize)Set the maximum size of a POST which will be saved by the container during authentication.voidsetMinProcessors(int minProcessors)Set the minimum number of processors to start at initialization.voidsetName(String name)Sets the name of this Connector.voidsetPort(int port)Set the port number on which we listen for requests.voidsetProperty(String name, String value)Set a configured property.voidsetProtocol(String protocol)Set the Coyote protocol which will be used by the connector.voidsetProtocolHandler(ProtocolHandler protocolHandler)Set theProtocolHandlerused by this connector.voidsetProtocolHandlerClassName(String protocolHandlerClassName)Set the class name of the Coyote protocol handler which will be used by the connector.voidsetProxyHandler(ProxyHandler proxyHandler)Sets the ProxyHandler implementation for this CoyoteConnector to use.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.voidsetScheme(String scheme)Set 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.voidsetSelectorThreadImpl(String selectorThreadImpl)Set the underlyingSelectorThreadimplementationvoidsetServerHeader(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.voidsetServerSocketTimeout(int serverSocketTimeout)Set the server socket timeout for this Connector.voidsetService(Service service)Set theServicewith which we are associated (if any).voidsetSslProtocol(String sslProtocol)Sets the SSL protocol variant to be used.voidsetSslProtocols(String sslProtocols)Sets the SSL protocol variants to be enabled.voidsetTcpNoDelay(boolean tcpNoDelay)Set the TCP no delay flag which will be set on the socket after accepting a connection.voidsetTomcatAuthentication(boolean tomcatAuthentication)voidsetURIEncoding(String uriEncoding)Set the URI encoding to be used for the URI.voidsetXframeOptions(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.voidsetXpoweredBy(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.voidstart()Begin processing requests via this Connector.voidstop()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 theServicewith which we are associated (if any).- Specified by:
getServicein interfaceConnector
-
setService
public void setService(Service service)
Set theServicewith which we are associated (if any).- Specified by:
setServicein 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:
getContainerin interfaceConnector
-
setContainer
public void setContainer(Container container)
Set the Container used for processing requests received by this Connector.- Specified by:
setContainerin 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:
getEnableLookupsin interfaceConnector
-
setEnableLookups
public void setEnableLookups(boolean enableLookups)
Set the "enable DNS lookups" flag.- Specified by:
setEnableLookupsin 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:
getFactoryin interfaceConnector
-
setFactory
public void setFactory(ServerSocketFactory factory)
Set the server socket factory used by this Container.- Specified by:
setFactoryin 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:
setMaxPostSizein 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:
getMaxSavePostSizein 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:
getRedirectPortin interfaceConnector
-
setRedirectPort
public void setRedirectPort(int redirectPort)
Set the redirect port number.- Specified by:
setRedirectPortin 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 thetimeoutparameter is ignored. Iffalse, then thetimeoutparameter 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:
getURIEncodingin interfaceConnector
-
setURIEncoding
public void setURIEncoding(String uriEncoding)
Set the URI encoding to be used for the URI.- Specified by:
setURIEncodingin 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:
setDefaultHostin interfaceConnector- Parameters:
defaultHost- The default host for this Connector
-
getDefaultHost
public String getDefaultHost()
Gets the default host of this Connector.- Specified by:
getDefaultHostin interfaceConnector- Returns:
- The default host of this Connector
-
getAuthPassthroughEnabled
public boolean getAuthPassthroughEnabled()
Returns the value of this connector's authPassthroughEnabled flag.- Specified by:
getAuthPassthroughEnabledin 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:
setAuthPassthroughEnabledin 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:
getProxyHandlerin 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:
setProxyHandlerin 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:ConnectorSets the jvmRoute associated with this connector.- Specified by:
setJvmRoutein interfaceConnector
-
getJvmRoute
public String getJvmRoute()
Description copied from interface:ConnectorGet the jvmRoute associated with this connector.- Specified by:
getJvmRoutein 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:
createRequestin 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:
createResponsein 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:
addLifecycleListenerin 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:
findLifecycleListenersin interfaceLifecycle
-
removeLifecycleListener
public void removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component.- Specified by:
removeLifecycleListenerin interfaceLifecycle- Parameters:
listener- The listener to add
-
createObjectName
protected ObjectName createObjectName(String domain, String type) throws MalformedObjectNameException
- Throws:
MalformedObjectNameException
-
initialize
public void initialize() throws LifecycleExceptionInitialize this connector (create ServerSocket here!)- Specified by:
initializein interfaceConnector- Throws:
LifecycleException- If this server was already initialized.
-
start
public void start() throws LifecycleExceptionBegin processing requests via this Connector.- Specified by:
startin interfaceLifecycle- Throws:
LifecycleException- if a fatal startup error occurs
-
stop
public void stop() throws LifecycleExceptionTerminate processing requests via this Connector.- Specified by:
stopin 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
-
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:
getCertificatesin 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 theAdapterused by this connector.- Specified by:
setHandlerin interfaceConnector
-
getHandler
public org.glassfish.grizzly.http.server.HttpHandler getHandler()
Get theAdapterused by this connector.- Specified by:
getHandlerin interfaceConnector
-
setProtocolHandler
public void setProtocolHandler(ProtocolHandler protocolHandler)
Set theProtocolHandlerused by this connector.
-
getSelectorThreadImpl
public String getSelectorThreadImpl()
Get the underlyingSelectorThreadimplementation, null if the default is used.
-
setSelectorThreadImpl
public void setSelectorThreadImpl(String selectorThreadImpl)
Set the underlyingSelectorThreadimplementation
-
-