public class Connector extends Object implements Connector, Lifecycle
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
authPassthroughEnabled
Flag indicating whether this connector is receiving its requests from
a trusted intermediate server
|
protected 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 |
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT| Constructor and Description |
|---|
Connector() |
| Modifier and Type | Method and 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 request
|
String |
getCiphers()
Gets the list of SSL cipher suites that are to be enabled
|
boolean |
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 the
Adapter 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 keystorePass
|
org.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 underlying
SelectorThread implementation, null if
the default is used. |
int |
getServerSocketTimeout()
Return the server socket timeout for this Connector.
|
Service |
getService()
Return the
Service 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(javax.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(javax.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 the
Adapter 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 keystorePass
|
void |
setMapper(org.glassfish.grizzly.http.server.util.Mapper mapper)
Set the
Mapper. |
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 the
ProtocolHandler 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 underlying
SelectorThread implementation |
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.
|
void |
setServerSocketTimeout(int serverSocketTimeout)
Set the server socket timeout for this Connector.
|
void |
setService(Service service)
Set the
Service 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 cached
|
void |
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.
|
protected Container container
protected LifecycleSupport lifecycle
protected int minProcessors
protected int maxSavePostSize
protected boolean initialized
protected org.glassfish.grizzly.http.server.util.Mapper mapper
protected boolean authPassthroughEnabled
protected ProxyHandler proxyHandler
protected String domain
protected ObjectName oname
public void removeProperty(String name)
public Service getService()
Service with which we are associated (if any).getService in interface Connectorpublic void setService(Service service)
Service with which we are associated (if any).setService in interface Connectorservice - The service that owns this Enginepublic String getCompression()
public void setCompression(String compression)
compression - The new compression value, which can be "on", "off"
or "force"public int getConnectionLinger()
public void setConnectionLinger(int connectionLinger)
connectionLinger - The new connection lingerpublic int getConnectionTimeout()
public void setConnectionTimeout(int connectionTimeout)
connectionTimeout - The new connection timeoutpublic int getConnectionUploadTimeout()
public void setConnectionUploadTimeout(int connectionUploadTimeout)
connectionUploadTimeout - The new connection upload timeoutpublic int getServerSocketTimeout()
public void setServerSocketTimeout(int serverSocketTimeout)
serverSocketTimeout - The new server socket timeoutpublic int getAcceptCount()
public void setAcceptCount(int count)
count - The new accept countpublic String getAddress()
public void setAddress(String address)
address - The bind IP addresspublic boolean getAllowTrace()
public void setAllowTrace(boolean allowTrace)
allowTrace - The new allowTrace flagpublic boolean isAvailable()
public int getBufferSize()
public void setBufferSize(int bufferSize)
bufferSize - The new input buffer size.public Container getContainer()
getContainer in interface Connectorpublic void setContainer(Container container)
setContainer in interface Connectorcontainer - The new Container to usepublic int getDebug()
public void setDebug(int debug)
debug - The new debugging detail levelpublic boolean getEnableLookups()
getEnableLookups in interface Connectorpublic void setEnableLookups(boolean enableLookups)
setEnableLookups in interface ConnectorenableLookups - The new "enable DNS lookups" flag valuepublic ServerSocketFactory getFactory()
getFactory in interface Connectorpublic void setFactory(ServerSocketFactory factory)
setFactory in interface Connectorfactory - The new server socket factorypublic String getInfo()
public org.glassfish.grizzly.http.server.util.Mapper getMapper()
public void setMapper(org.glassfish.grizzly.http.server.util.Mapper mapper)
Mapper.mapper - public int getMinProcessors()
public void setMinProcessors(int minProcessors)
minProcessors - The new minimum processorspublic int getMaxProcessors()
public void setMaxProcessors(int maxProcessors)
maxProcessors - The new maximum processorspublic int getMaxPostSize()
public void setMaxPostSize(int maxPostSize)
setMaxPostSize in interface ConnectormaxPostSize - The new maximum size in bytes of a POST which will
be automatically parsed by the containerpublic int getMaxSavePostSize()
getMaxSavePostSize in interface Connectorpublic void setMaxSavePostSize(int maxSavePostSize)
maxSavePostSize - The new maximum size in bytes of a POST which will
be saved by the container during authentication.public int getPort()
public void setPort(int port)
port - The new port numberpublic void setName(String name)
public String getName()
public void setInstanceName(String instanceName)
instanceName - the instance namepublic String getInstanceName()
public String getProtocol()
public void setProtocol(String protocol)
protocol - The Coyote protocol namepublic String getProtocolHandlerClassName()
public void setProtocolHandlerClassName(String protocolHandlerClassName)
protocolHandlerClassName - The new class namepublic ProtocolHandler getProtocolHandler()
public String getProxyName()
public void setProxyName(String proxyName)
proxyName - The new proxy server namepublic int getProxyPort()
public void setProxyPort(int proxyPort)
proxyPort - The new proxy server portpublic int getRedirectPort()
getRedirectPort in interface Connectorpublic void setRedirectPort(int redirectPort)
setRedirectPort in interface ConnectorredirectPort - The redirect port number (non-SSL to SSL)public boolean getDisableUploadTimeout()
public void setDisableUploadTimeout(boolean isDisabled)
isDisabled - If true, then the timeout
parameter is ignored. If false, then the
timeout parameter is used to control uploads.public int getMaxHttpHeaderSize()
public void setMaxHttpHeaderSize(int size)
public boolean getKeepAlive()
public void setKeepAlive(boolean keepAlive)
public int getMaxKeepAliveRequests()
public void setMaxKeepAliveRequests(int mkar)
public String getScheme()
public void setScheme(String scheme)
public boolean getSecure()
public void setSecure(boolean secure)
public boolean getBlocking()
public void setBlocking(boolean blocking)
blocking - The new blocking connection flagpublic boolean getTomcatAuthentication()
public void setTomcatAuthentication(boolean tomcatAuthentication)
public boolean getTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay - The new TCP no delay flagpublic String getURIEncoding()
getURIEncoding in interface Connectorpublic void setURIEncoding(String uriEncoding)
setURIEncoding in interface ConnectoruriEncoding - The new URI character encoding.public boolean isXpoweredBy()
public void setXpoweredBy(boolean xpoweredBy)
xpoweredBy - true if generation of X-Powered-By response header is
to be enabled, false otherwisepublic boolean isServerHeader()
public void setServerHeader(boolean serverHeader)
serverHeader - true if generation of Server response header is
to be enabled, false otherwisepublic boolean isXframeOptions()
public void setXframeOptions(boolean xframeOptions)
xframeOptions - true if generation of X-Frame-Options response header is
to be enabled, false otherwisepublic void setDefaultHost(String defaultHost)
setDefaultHost in interface ConnectordefaultHost - The default host for this Connectorpublic String getDefaultHost()
getDefaultHost in interface Connectorpublic boolean getAuthPassthroughEnabled()
getAuthPassthroughEnabled in interface Connectorpublic void setAuthPassthroughEnabled(boolean authPassthroughEnabled)
setAuthPassthroughEnabled in interface ConnectorauthPassthroughEnabled - true if this connector is receiving its
requests from a trusted intermediate server, false otherwisepublic ProxyHandler getProxyHandler()
getProxyHandler in interface Connectorpublic void setProxyHandler(ProxyHandler proxyHandler)
setProxyHandler in interface ConnectorproxyHandler - ProxyHandler instance to usepublic void setEnabled(boolean enabled)
public boolean isEnabled()
public void setJvmRoute(String jvmRoute)
ConnectorsetJvmRoute in interface Connectorpublic String getJvmRoute()
ConnectorgetJvmRoute in interface Connectorpublic Request createRequest()
createRequest in interface Connectorpublic Response createResponse()
createResponse in interface Connectorpublic void requestStartEvent(javax.servlet.http.HttpServletRequest request,
Host host,
Context context)
request - the request objecthost - the virtual server to which the request was mappedcontext - the Context to which the request was mappedpublic void requestEndEvent(javax.servlet.http.HttpServletRequest request,
Host host,
Context context,
int statusCode)
request - the request objecthost - the virtual server to which the request was mappedcontext - the Context to which the request was mappedstatusCode - the response status codepublic void addLifecycleListener(LifecycleListener listener)
addLifecycleListener in interface Lifecyclelistener - The listener to addpublic List<LifecycleListener> findLifecycleListeners()
findLifecycleListeners in interface Lifecyclepublic void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener in interface Lifecyclelistener - The listener to addprotected ObjectName createObjectName(String domain, String type) throws MalformedObjectNameException
MalformedObjectNameExceptionpublic void initialize()
throws LifecycleException
initialize in interface ConnectorLifecycleException - If this server was already initialized.public void start()
throws LifecycleException
start in interface LifecycleLifecycleException - if a fatal startup error occurspublic void stop()
throws LifecycleException
stop in interface LifecycleLifecycleException - if a fatal shutdown error occurspublic boolean getClientAuth()
public void setClientAuth(boolean clientAuth)
public String getKeystoreFile()
public void setKeystoreFile(String keystoreFile)
public String getKeystorePass()
public void setKeystorePass(String keystorePass)
public String getCiphers()
public void setCiphers(String ciphers)
ciphers - Comma-separated list of SSL cipher suitespublic void setSslSessionTimeout(String timeout)
public String getSslSessionTimeout()
public void setSsl3SessionTimeout(String timeout)
public String getSsl3SessionTimeout()
public void setSslSessionCacheSize(String cacheSize)
public String getSslSessionCacheSize()
public String getKeyAlias()
public void setKeyAlias(String alias)
alias - The alias name of the keypair and supporting certificate
chainpublic String getSslProtocol()
public void setSslProtocol(String sslProtocol)
sslProtocol - SSL protocol variantpublic String getSslProtocols()
public void setSslProtocols(String sslProtocols)
sslProtocols - Comma-separated list of SSL protocol variantspublic X509Certificate[] getCertificates(Request request)
getCertificates in interface Connectorpublic ObjectName getController()
public void setController(ObjectName controller)
public ObjectName getObjectName()
public String getDomain()
public void setDomain(String domain)
public void setHandler(org.glassfish.grizzly.http.server.HttpHandler handler)
Adapter used by this connector.setHandler in interface Connectorpublic org.glassfish.grizzly.http.server.HttpHandler getHandler()
Adapter used by this connector.getHandler in interface Connectorpublic void setProtocolHandler(ProtocolHandler protocolHandler)
ProtocolHandler used by this connector.public String getSelectorThreadImpl()
SelectorThread implementation, null if
the default is used.public void setSelectorThreadImpl(String selectorThreadImpl)
SelectorThread implementationCopyright © 2017. All rights reserved.