public class Connector extends Object implements Lifecycle, MBeanRegistration
Modifier and Type | Field and Description |
---|---|
protected Adapter |
adapter
Coyote adapter.
|
protected Set<String> |
allowedHosts
Allowed virtual hosts.
|
protected boolean |
allowTrace
Do we allow TRACE ?
|
protected Container |
container
The Container used for processing requests received by this Connector.
|
protected String |
domain |
protected boolean |
enableLookups
The "enable DNS lookups" flag for this Connector.
|
protected static String |
info
Descriptive information about this Connector implementation.
|
protected boolean |
initialized
Has this component been initialized yet?
|
protected LifecycleSupport |
lifecycle
The lifecycle event support for this component.
|
protected int |
maxPostSize
Maximum size of a POST which will be automatically parsed by the
container.
|
protected int |
maxSavePostSize
Maximum size of a POST which will be saved by the container
during authentication.
|
protected MBeanServer |
mserver |
protected ObjectName |
oname |
protected int |
port
The port number on which we listen for requests.
|
protected ProtocolHandler |
protocolHandler
Coyote protocol handler.
|
protected String |
protocolHandlerClassName
Coyote Protocol handler class name.
|
protected String |
proxyName
The server name to which we should pretend requests to this Connector
were directed.
|
protected int |
proxyPort
The server port to which we should pretent requests to this Connector
were directed.
|
static boolean |
RECYCLE_FACADES
Alternate flag to enable recycling of facades.
|
protected int |
redirectPort
The redirect port for non-SSL to SSL redirects.
|
protected static HashMap<String,String> |
replacements |
protected String |
scheme
The request scheme that will be set on all requests received
through this connector.
|
protected boolean |
secure
The secure connection flag that will be set on all requests received
through this connector.
|
protected Service |
service
The
Service we are associated with (if any). |
protected boolean |
started
Has this component been started yet?
|
protected boolean |
stopped
The shutdown signal to our background thread
|
protected Thread |
thread
The background thread.
|
protected static String |
URI_ENCODING |
protected String |
URIEncoding
URI encoding.
|
protected static boolean |
USE_BODY_ENCODING_FOR_QUERY_STRING |
protected boolean |
useBodyEncodingForURI
URI encoding as body.
|
protected boolean |
useIPVHosts
Flag to use IP-based virtual hosting.
|
protected static boolean |
X_POWERED_BY |
protected boolean |
xpoweredBy
Is generation of X-Powered-By response header enabled/disabled?
|
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
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() |
LifecycleListener[] |
findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle.
|
Set<String> |
getAllowedHosts()
Set of allowed hosts.
|
boolean |
getAllowTrace()
True if the TRACE method is allowed.
|
Object |
getAttribute(String name)
Return a configured property.
|
int |
getBufferSize()
Deprecated.
|
Container |
getContainer()
Return the Container used for processing requests received by this
Connector.
|
ObjectName |
getController() |
String |
getDomain() |
boolean |
getEnableLookups()
Return the "enable DNS lookups" flag.
|
String |
getInfo()
Return descriptive information about this Connector implementation.
|
int |
getMaxPostSize()
Return the maximum size of a POST which will be automatically
parsed by the container.
|
int |
getMaxSavePostSize()
Return the maximum size of a POST which will be saved by the container
during authentication.
|
ObjectName |
getObjectName() |
int |
getPort()
Return the port number on which we listen for requests.
|
Object |
getProperty(String name)
Return a configured property.
|
String |
getProtocol()
Return the Coyote protocol handler in use.
|
ProtocolHandler |
getProtocolHandler()
Return the protocol handler associated with the connector.
|
String |
getProtocolHandlerClassName()
Return the class name of the Coyote protocol handler in use.
|
String |
getProxyName()
Return the proxy server name for this Connector.
|
int |
getProxyPort()
Return the proxy server port for this Connector.
|
int |
getRedirectPort()
Return the port number to which a request should be redirected if
it comes in on a non-SSL port and is subject to a security constraint
with a transport guarantee that requires SSL.
|
String |
getScheme()
Return the scheme that will be assigned to requests received
through this connector.
|
boolean |
getSecure()
Return the secure connection flag that will be assigned to requests
received through this connector.
|
Service |
getService()
Return the
Service with which we are associated (if any). |
String |
getURIEncoding()
Return the character encoding to be used for the URI.
|
boolean |
getUseBodyEncodingForURI()
Return the true if the entity body encoding should be used for the URI.
|
boolean |
getUseIPVHosts()
Test if IP-based virtual hosting is enabled.
|
boolean |
getXpoweredBy()
Indicates whether the generation of an X-Powered-By response header for
servlet-generated responses is enabled or disabled for this Connector.
|
boolean |
hasIoEvents()
Indicates if the protocol handler support IO events.
|
void |
init()
Initialize this connector (create ServerSocket here!)
|
boolean |
isAvailable()
Is this connector available for processing requests?
|
void |
pause()
Pause the connector.
|
void |
postDeregister() |
void |
postRegister(Boolean registrationDone) |
void |
preDeregister() |
ObjectName |
preRegister(MBeanServer server,
ObjectName name) |
void |
removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component.
|
void |
resume()
Pause the connector.
|
void |
setAllowedHosts(Set<String> allowedHosts)
Restrict the connector to certain hosts.
|
void |
setAllowTrace(boolean allowTrace)
Set the allowTrace flag, to disable or enable the TRACE HTTP method.
|
void |
setAttribute(String name,
Object value)
Set a configured property.
|
void |
setBufferSize(int bufferSize)
Deprecated.
|
void |
setContainer(Container container)
Set the Container used for processing requests received by this
Connector.
|
void |
setController(ObjectName controller) |
void |
setEnableLookups(boolean enableLookups)
Set the "enable DNS lookups" flag.
|
void |
setMaxPostSize(int maxPostSize)
Set the maximum size of a POST which will be automatically
parsed by the container.
|
void |
setMaxSavePostSize(int maxSavePostSize)
Set the maximum size of a POST which will be saved by the container
during authentication.
|
void |
setPort(int port)
Set the port number on which we listen for requests.
|
boolean |
setProperty(String name,
String value)
Set a configured property.
|
protected void |
setProtocol(String protocol)
Set the Coyote protocol which will be used by the connector.
|
void |
setProtocolHandlerClassName(String protocolHandlerClassName)
Set the class name of the Coyote protocol handler which will be used
by the connector.
|
void |
setProxyName(String proxyName)
Set the proxy server name for this Connector.
|
void |
setProxyPort(int proxyPort)
Set the proxy server port for this Connector.
|
void |
setRedirectPort(int redirectPort)
Set the redirect port number.
|
void |
setScheme(String scheme)
Set the scheme that will be assigned to requests received through
this connector.
|
void |
setSecure(boolean secure)
Set the secure connection flag that will be assigned to requests
received through this connector.
|
void |
setService(Service service)
Set the
Service with which we are associated (if any). |
void |
setURIEncoding(String URIEncoding)
Set the URI encoding to be used for the URI.
|
void |
setUseBodyEncodingForURI(boolean useBodyEncodingForURI)
Set if the entity body encoding should be used for the URI.
|
void |
setUseIPVHosts(boolean useIPVHosts)
Enable the use of IP-based virtual hosting.
|
void |
setXpoweredBy(boolean xpoweredBy)
Enables or disables the generation of an X-Powered-By header (with value
Servlet/2.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.
|
public static final boolean RECYCLE_FACADES
protected static final boolean X_POWERED_BY
protected static final String URI_ENCODING
protected static final boolean USE_BODY_ENCODING_FOR_QUERY_STRING
protected Service service
Service
we are associated with (if any).protected boolean allowTrace
protected Container container
protected boolean enableLookups
protected boolean xpoweredBy
protected static final String info
protected LifecycleSupport lifecycle
protected int port
protected String proxyName
Host
header is used.protected int proxyPort
port
property is used.protected int redirectPort
protected String scheme
protected boolean secure
protected int maxPostSize
protected int maxSavePostSize
protected boolean initialized
protected boolean started
protected boolean stopped
protected boolean useIPVHosts
protected Thread thread
protected String protocolHandlerClassName
protected ProtocolHandler protocolHandler
protected Adapter adapter
protected String URIEncoding
protected boolean useBodyEncodingForURI
protected String domain
protected ObjectName oname
protected MBeanServer mserver
public Service getService()
Service
with which we are associated (if any).public void setService(Service service)
Service
with which we are associated (if any).service
- The service that owns this Enginepublic boolean getAllowTrace()
public void setAllowTrace(boolean allowTrace)
allowTrace
- The new allowTrace flagpublic void setAllowedHosts(Set<String> allowedHosts)
public boolean isAvailable()
public int getBufferSize()
public void setBufferSize(int bufferSize)
bufferSize
- The new input buffer size.public Container getContainer()
public void setContainer(Container container)
container
- The new Container to usepublic boolean getEnableLookups()
public void setEnableLookups(boolean enableLookups)
enableLookups
- The new "enable DNS lookups" flag valuepublic String getInfo()
public int getMaxPostSize()
public void setMaxPostSize(int maxPostSize)
maxPostSize
- The new maximum size in bytes of a POST which will
be automatically parsed by the containerpublic int getMaxSavePostSize()
public void setMaxSavePostSize(int maxSavePostSize)
maxSavePostSize
- The new maximum size in bytes of a POST which will
be saved by the container during authentication.public int getPort()
public void setPort(int port)
port
- The new port numberpublic String getProtocol()
protected void setProtocol(String protocol)
protocol
- The Coyote protocol namepublic String getProtocolHandlerClassName()
public void setProtocolHandlerClassName(String protocolHandlerClassName)
protocolHandlerClassName
- The new class namepublic ProtocolHandler getProtocolHandler()
public String getProxyName()
public void setProxyName(String proxyName)
proxyName
- The new proxy server namepublic int getProxyPort()
public void setProxyPort(int proxyPort)
proxyPort
- The new proxy server portpublic int getRedirectPort()
public void setRedirectPort(int redirectPort)
redirectPort
- The redirect port number (non-SSL to SSL)public String getScheme()
public void setScheme(String scheme)
scheme
- The new schemepublic boolean getSecure()
public void setSecure(boolean secure)
secure
- The new secure connection flagpublic String getURIEncoding()
public void setURIEncoding(String URIEncoding)
URIEncoding
- The new URI character encoding.public boolean getUseBodyEncodingForURI()
public void setUseBodyEncodingForURI(boolean useBodyEncodingForURI)
useBodyEncodingForURI
- The new value for the flag.public boolean getXpoweredBy()
public boolean hasIoEvents()
public void setXpoweredBy(boolean xpoweredBy)
xpoweredBy
- true if generation of X-Powered-By response header is
to be enabled, false otherwisepublic void setUseIPVHosts(boolean useIPVHosts)
useIPVHosts
- true
if Hosts are identified by IP,
false/code> if Hosts are identified by name.
public boolean getUseIPVHosts()
public Request createRequest()
public Response createResponse()
public void addLifecycleListener(LifecycleListener listener)
addLifecycleListener
in interface Lifecycle
listener
- The listener to addpublic LifecycleListener[] findLifecycleListeners()
findLifecycleListeners
in interface Lifecycle
public void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener
in interface Lifecycle
listener
- The listener to addprotected ObjectName createObjectName(String domain, String type) throws MalformedObjectNameException
MalformedObjectNameException
public void init() throws LifecycleException
LifecycleException
public void pause() throws LifecycleException
LifecycleException
public void resume() throws LifecycleException
LifecycleException
public void start() throws LifecycleException
start
in interface Lifecycle
LifecycleException
- if a fatal startup error occurspublic void stop() throws LifecycleException
stop
in interface Lifecycle
LifecycleException
- if a fatal shutdown error occurspublic ObjectName getController()
public void setController(ObjectName controller)
public ObjectName getObjectName()
public String getDomain()
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
preRegister
in interface MBeanRegistration
Exception
public void postRegister(Boolean registrationDone)
postRegister
in interface MBeanRegistration
public void preDeregister() throws Exception
preDeregister
in interface MBeanRegistration
Exception
public void postDeregister()
postDeregister
in interface MBeanRegistration
Copyright © 2014 JBoss by Red Hat. All rights reserved.