| 
 | Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.catalina.connector.Connector
public class Connector
Implementation of a Coyote connector.
| Field Summary | |
|---|---|
| protected  Adapter | adapterCoyote adapter. | 
| protected  boolean | allowTraceDo we allow TRACE ? | 
| protected  Container | containerThe Container used for processing requests received by this Connector. | 
| protected  java.lang.String | domain | 
| protected  boolean | emptySessionPathUse "/" as path for session cookies ? | 
| protected  boolean | enableLookupsThe "enable DNS lookups" flag for this Connector. | 
| protected static java.lang.String | infoDescriptive information about this Connector implementation. | 
| protected  boolean | initializedHas this component been initialized yet? | 
| protected  LifecycleSupport | lifecycleThe lifecycle event support for this component. | 
| protected  Mapper | mapperMapper. | 
| protected  MapperListener | mapperListenerMapper listener. | 
| protected  int | maxParameterCountThe maximum number of parameters (GET plus POST) which will be automatically parsed by the container. 10000 by default. | 
| protected  int | maxPostSizeMaximum size of a POST which will be automatically parsed by the container. 2MB by default. | 
| protected  int | maxSavePostSizeMaximum size of a POST which will be saved by the container during authentication. 4kB by default | 
| protected  javax.management.MBeanServer | mserver | 
| protected  javax.management.ObjectName | oname | 
| protected  java.lang.String | parseBodyMethodsComma-separated list of HTTP methods that will be parsed according to POST-style rules for application/x-www-form-urlencoded request bodies. | 
| protected  java.util.Set<java.lang.String> | parseBodyMethodsSetA Set of methods determined by parseBodyMethods. | 
| protected  int | portThe port number on which we listen for requests. | 
| protected  ProtocolHandler | protocolHandlerCoyote protocol handler. | 
| protected  java.lang.String | protocolHandlerClassNameCoyote Protocol handler class name. | 
| protected  java.lang.String | proxyNameThe server name to which we should pretend requests to this Connector were directed. | 
| protected  int | proxyPortThe server port to which we should pretent requests to this Connector were directed. | 
| static boolean | RECYCLE_FACADESAlternate flag to enable recycling of facades. | 
| protected  int | redirectPortThe redirect port for non-SSL to SSL redirects. | 
| protected static java.util.HashMap | replacements | 
| protected  java.lang.String | schemeThe request scheme that will be set on all requests received through this connector. | 
| protected  boolean | secureThe secure connection flag that will be set on all requests received through this connector. | 
| protected  Service | serviceThe Servicewe are associated with (if any). | 
| protected  StringManager | smThe string manager for this package. | 
| protected  boolean | startedHas this component been started yet? | 
| protected  boolean | stoppedThe shutdown signal to our background thread | 
| protected  java.lang.Thread | threadThe background thread. | 
| protected  java.lang.String | URIEncodingURI encoding. | 
| protected  boolean | useBodyEncodingForURIURI encoding as body. | 
| protected  boolean | useIPVHostsFlag to use IP-based virtual hosting. | 
| protected  boolean | xpoweredBy | 
| Fields inherited from interface org.apache.catalina.Lifecycle | 
|---|
| AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT | 
| Constructor Summary | |
|---|---|
| Connector() | |
| Connector(java.lang.String protocol) | |
| Method Summary | |
|---|---|
|  void | addLifecycleListener(LifecycleListener listener)Add a lifecycle event listener to this component. | 
| protected  javax.management.ObjectName | createObjectName(java.lang.String domain,
                 java.lang.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() | 
| protected  void | findContainer() | 
|  LifecycleListener[] | findLifecycleListeners()Get the lifecycle listeners associated with this lifecycle. | 
|  boolean | getAllowTrace()True if the TRACE method is allowed. | 
|  java.lang.Object | getAttribute(java.lang.String name)Return a configured property. | 
|  int | getBufferSize()Deprecated. | 
|  Container | getContainer()Return the Container used for processing requests received by this Connector. | 
|  javax.management.ObjectName | getController() | 
|  java.lang.String | getDomain() | 
|  boolean | getEmptySessionPath()Return the "empty session path" flag. | 
|  boolean | getEnableLookups()Return the "enable DNS lookups" flag. | 
|  java.lang.String | getExecutorName() | 
|  java.lang.String | getInfo()Return descriptive information about this Connector implementation. | 
|  int | getLocalPort()Return the port number on which this connector is listening to requests. | 
|  Mapper | getMapper()Return the mapper. | 
|  int | getMaxHeaderCount()Return the maximum number of headers that are allowed by the container. | 
|  int | getMaxParameterCount()Return the maximum number of parameters (GET plus POST) that will be automatically parsed by the container. | 
|  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. | 
|  javax.management.ObjectName | getObjectName() | 
|  java.lang.String | getParseBodyMethods() | 
|  int | getPort()Return the port number on which this connector is configured to listen for requests. | 
|  java.lang.Object | getProperty(java.lang.String name)Return a configured property. | 
|  java.lang.String | getProtocol()Return the Coyote protocol handler in use. | 
|  ProtocolHandler | getProtocolHandler()Return the protocol handler associated with the connector. | 
|  java.lang.String | getProtocolHandlerClassName()Return the class name of the Coyote protocol handler in use. | 
|  java.lang.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. | 
|  java.lang.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 Servicewith which we are associated (if any). | 
|  java.lang.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. | 
|  void | init() | 
|  void | initialize()Initialize this connector (create ServerSocket here!) | 
|  boolean | isAvailable()Is this connector available for processing requests? | 
| protected  boolean | isParseBodyMethod(java.lang.String method) | 
|  void | pause()Pause the connector. | 
|  void | postDeregister() | 
|  void | postRegister(java.lang.Boolean registrationDone) | 
|  void | preDeregister() | 
|  javax.management.ObjectName | preRegister(javax.management.MBeanServer server,
            javax.management.ObjectName name) | 
|  void | removeLifecycleListener(LifecycleListener listener)Remove a lifecycle event listener from this component. | 
|  void | removeProperty(java.lang.String name)remove a configured property. | 
|  void | resume()Pause the connector. | 
|  void | setAllowTrace(boolean allowTrace)Set the allowTrace flag, to disable or enable the TRACE HTTP method. | 
|  void | setAttribute(java.lang.String name,
             java.lang.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(javax.management.ObjectName controller) | 
|  void | setEmptySessionPath(boolean emptySessionPath)Set the "empty session path" flag. | 
|  void | setEnableLookups(boolean enableLookups)Set the "enable DNS lookups" flag. | 
|  void | setMaxHeaderCount(int maxHeaderCount)Set the maximum number of headers in a request that are allowed by the container. | 
|  void | setMaxParameterCount(int maxParameterCount)Set the maximum number of parameters (GET plus POST) that will be automatically parsed by the container. | 
|  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 | setParseBodyMethods(java.lang.String methods) | 
|  void | setPort(int port)Set the port number on which we listen for requests. | 
|  boolean | setProperty(java.lang.String name,
            java.lang.String value)Set a configured property. | 
|  void | setProtocol(java.lang.String protocol)Set the Coyote protocol which will be used by the connector. | 
|  void | setProtocolHandlerClassName(java.lang.String protocolHandlerClassName)Set the class name of the Coyote protocol handler which will be used by the connector. | 
|  void | setProxyName(java.lang.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(java.lang.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 Servicewith which we are associated (if any). | 
|  void | setURIEncoding(java.lang.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.5) 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. | 
|  java.lang.String | toString()Provide a useful toString() implementation as it may be used when logging Lifecycle errors to identify the component. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final boolean RECYCLE_FACADES
protected Service service
Service we are associated with (if any).
protected boolean allowTrace
protected Container container
protected boolean emptySessionPath
protected boolean enableLookups
protected boolean xpoweredBy
protected static final java.lang.String info
protected LifecycleSupport lifecycle
protected int port
protected java.lang.String proxyName
Host header is used.
protected int proxyPort
port property is used.
protected int redirectPort
protected java.lang.String scheme
protected boolean secure
protected StringManager sm
protected int maxParameterCount
protected int maxPostSize
protected int maxSavePostSize
protected java.lang.String parseBodyMethods
protected java.util.Set<java.lang.String> parseBodyMethodsSet
parseBodyMethods.
protected boolean initialized
protected boolean started
protected boolean stopped
protected boolean useIPVHosts
protected java.lang.Thread thread
protected java.lang.String protocolHandlerClassName
protected ProtocolHandler protocolHandler
protected Adapter adapter
protected Mapper mapper
protected MapperListener mapperListener
protected java.lang.String URIEncoding
protected boolean useBodyEncodingForURI
protected static java.util.HashMap replacements
protected java.lang.String domain
protected javax.management.ObjectName oname
protected javax.management.MBeanServer mserver
| Constructor Detail | 
|---|
public Connector()
          throws java.lang.Exception
java.lang.Exception
public Connector(java.lang.String protocol)
          throws java.lang.Exception
java.lang.Exception| Method Detail | 
|---|
public java.lang.Object getProperty(java.lang.String name)
public boolean setProperty(java.lang.String name,
                           java.lang.String value)
public java.lang.Object getAttribute(java.lang.String name)
public void setAttribute(java.lang.String name,
                         java.lang.Object value)
public void removeProperty(java.lang.String name)
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 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 getEmptySessionPath()
public void setEmptySessionPath(boolean emptySessionPath)
emptySessionPath - The new "empty session path" flag valuepublic boolean getEnableLookups()
public void setEnableLookups(boolean enableLookups)
enableLookups - The new "enable DNS lookups" flag valuepublic java.lang.String getInfo()
public Mapper getMapper()
public int getMaxHeaderCount()
public void setMaxHeaderCount(int maxHeaderCount)
maxHeaderCount - The new settingpublic int getMaxParameterCount()
public void setMaxParameterCount(int maxParameterCount)
maxParameterCount - The new settingpublic 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 java.lang.String getParseBodyMethods()
public void setParseBodyMethods(java.lang.String methods)
protected boolean isParseBodyMethod(java.lang.String method)
public int getPort()
public void setPort(int port)
port - The new port numberpublic int getLocalPort()
port of zero is used then this method
 will report the actual port bound.
public java.lang.String getProtocol()
public void setProtocol(java.lang.String protocol)
protocol - The Coyote protocol namepublic java.lang.String getProtocolHandlerClassName()
public void setProtocolHandlerClassName(java.lang.String protocolHandlerClassName)
protocolHandlerClassName - The new class namepublic ProtocolHandler getProtocolHandler()
public java.lang.String getProxyName()
public void setProxyName(java.lang.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 java.lang.String getScheme()
public void setScheme(java.lang.String scheme)
scheme - The new schemepublic boolean getSecure()
public void setSecure(boolean secure)
secure - The new secure connection flagpublic java.lang.String getURIEncoding()
public void setURIEncoding(java.lang.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 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 java.lang.String getExecutorName()
public Request createRequest()
public Response createResponse()
public void addLifecycleListener(LifecycleListener listener)
addLifecycleListener in interface Lifecyclelistener - The listener to addpublic LifecycleListener[] findLifecycleListeners()
findLifecycleListeners in interface Lifecyclepublic void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener in interface Lifecyclelistener - The listener to add
protected javax.management.ObjectName createObjectName(java.lang.String domain,
                                                       java.lang.String type)
                                                throws javax.management.MalformedObjectNameException
javax.management.MalformedObjectNameException
public void initialize()
                throws LifecycleException
LifecycleException
public void pause()
           throws LifecycleException
LifecycleException
public void resume()
            throws LifecycleException
LifecycleException
public void start()
           throws LifecycleException
start in interface LifecycleLifecycleException - if a fatal startup error occurs
public void stop()
          throws LifecycleException
stop in interface LifecycleLifecycleException - if a fatal shutdown error occurspublic javax.management.ObjectName getController()
public void setController(javax.management.ObjectName controller)
public javax.management.ObjectName getObjectName()
public java.lang.String getDomain()
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
                                               javax.management.ObjectName name)
                                        throws java.lang.Exception
preRegister in interface javax.management.MBeanRegistrationjava.lang.Exceptionpublic void postRegister(java.lang.Boolean registrationDone)
postRegister in interface javax.management.MBeanRegistration
public void preDeregister()
                   throws java.lang.Exception
preDeregister in interface javax.management.MBeanRegistrationjava.lang.Exceptionpublic void postDeregister()
postDeregister in interface javax.management.MBeanRegistrationprotected void findContainer()
public void init()
          throws java.lang.Exception
java.lang.Exception
public void destroy()
             throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String toString()
toString in class java.lang.Object| 
 | Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||