Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » connector » [javadoc | source]
org.apache.catalina.connector
public class: Connector [javadoc | source]
java.lang.Object
   org.apache.catalina.connector.Connector

All Implemented Interfaces:
    MBeanRegistration, Lifecycle

Implementation of a Coyote connector for Tomcat 5.x.
Field Summary
public static final  boolean RECYCLE_FACADES    Alternate flag to enable recycling of facades. 
protected  Service service    The Service we are associated with (if any). 
protected  boolean allowTrace    Do we allow TRACE ? 
protected  Container container    The Container used for processing requests received by this Connector. 
protected  boolean emptySessionPath    Use "/" as path for session cookies ? 
protected  boolean enableLookups    The "enable DNS lookups" flag for this Connector. 
protected  boolean xpoweredBy     
protected static final  String info    Descriptive information about this Connector implementation. 
protected  LifecycleSupport lifecycle    The lifecycle event support for this component. 
protected  int port    The port number on which we listen for requests. 
protected  String proxyName    The server name to which we should pretend requests to this Connector were directed. This is useful when operating Tomcat behind a proxy server, so that redirects get constructed accurately. If not specified, the server name included in the Host header is used. 
protected  int proxyPort    The server port to which we should pretent requests to this Connector were directed. This is useful when operating Tomcat behind a proxy server, so that redirects get constructed accurately. If not specified, the port number specified by the port property is used. 
protected  int redirectPort    The redirect port for non-SSL to SSL redirects. 
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  StringManager sm    The string manager for this package. 
protected  int maxPostSize    Maximum size of a POST which will be automatically parsed by the container. 2MB by default. 
protected  int maxSavePostSize    Maximum size of a POST which will be saved by the container during authentication. 4kB by default 
protected  boolean initialized    Has this component been initialized yet? 
protected  boolean started    Has this component been started yet? 
protected  boolean stopped    The shutdown signal to our background thread 
protected  boolean useIPVHosts    Flag to use IP-based virtual hosting. 
protected  Thread thread    The background thread. 
protected  String protocolHandlerClassName    Coyote Protocol handler class name. Defaults to the Coyote HTTP/1.1 protocolHandler. 
protected  ProtocolHandler protocolHandler    Coyote protocol handler. 
protected  Adapter adapter    Coyote adapter. 
protected  Mapper mapper    Mapper. 
protected  MapperListener mapperListener    Mapper listener. 
protected  String URIEncoding    URI encoding. 
protected  boolean useBodyEncodingForURI    URI encoding as body. 
protected static  HashMap replacements     
protected  String domain     
protected  ObjectName oname     
protected  MBeanServer mserver     
 ObjectName controller     
Constructor:
 public Connector() throws Exception 
 public Connector(String protocol) throws Exception 
Method from org.apache.catalina.connector.Connector Summary:
addLifecycleListener,   createObjectName,   createRequest,   createResponse,   destroy,   findContainer,   findLifecycleListeners,   getAllowTrace,   getAttribute,   getBufferSize,   getContainer,   getController,   getDomain,   getEmptySessionPath,   getEnableLookups,   getInfo,   getMapper,   getMaxPostSize,   getMaxSavePostSize,   getObjectName,   getPort,   getProperty,   getProtocol,   getProtocolHandler,   getProtocolHandlerClassName,   getProxyName,   getProxyPort,   getRedirectPort,   getScheme,   getSecure,   getService,   getURIEncoding,   getUseBodyEncodingForURI,   getUseIPVHosts,   getXpoweredBy,   init,   initialize,   isAvailable,   pause,   postDeregister,   postRegister,   preDeregister,   preRegister,   removeLifecycleListener,   removeProperty,   resume,   setAllowTrace,   setAttribute,   setBufferSize,   setContainer,   setController,   setEmptySessionPath,   setEnableLookups,   setMaxPostSize,   setMaxSavePostSize,   setPort,   setProperty,   setProtocol,   setProtocolHandlerClassName,   setProxyName,   setProxyPort,   setRedirectPort,   setScheme,   setSecure,   setService,   setURIEncoding,   setUseBodyEncodingForURI,   setUseIPVHosts,   setXpoweredBy,   start,   stop
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.connector.Connector Detail:
 public  void addLifecycleListener(LifecycleListener listener) 
    Add a lifecycle event listener to this component.
 protected ObjectName createObjectName(String domain,
    String type) throws MalformedObjectNameException 
 public Request createRequest() 
    Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible Container.
 public Response createResponse() 
    Create (or allocate) and return a Response object suitable for receiving the contents of a Response from the responsible Container.
 public  void destroy() throws Exception 
 protected  void findContainer() 
 public LifecycleListener[] findLifecycleListeners() 
    Get the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners registered, a zero-length array is returned.
 public boolean getAllowTrace() 
    True if the TRACE method is allowed. Default value is "false".
 public Object getAttribute(String name) 
    Return a configured property.
 public int getBufferSize() 
Deprecated!
    Return the input buffer size for this Connector.
 public Container getContainer() 
    Return the Container used for processing requests received by this Connector.
 public ObjectName getController() 
 public String getDomain() 
 public boolean getEmptySessionPath() 
    Return the "empty session path" flag.
 public boolean getEnableLookups() 
    Return the "enable DNS lookups" flag.
 public String getInfo() 
    Return descriptive information about this Connector implementation.
 public Mapper getMapper() 
    Return the mapper.
 public int getMaxPostSize() 
    Return the maximum size of a POST which will be automatically parsed by the container.
 public int getMaxSavePostSize() 
    Return the maximum size of a POST which will be saved by the container during authentication.
 public ObjectName getObjectName() 
 public int getPort() 
    Return the port number on which we listen for requests.
 public Object getProperty(String name) 
    Return a configured property.
 public String getProtocol() 
    Return the Coyote protocol handler in use.
 public ProtocolHandler getProtocolHandler() 
    Return the protocol handler associated with the connector.
 public String getProtocolHandlerClassName() 
    Return the class name of the Coyote protocol handler in use.
 public String getProxyName() 
    Return the proxy server name for this Connector.
 public int getProxyPort() 
    Return the proxy server port for this Connector.
 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.
 public String getScheme() 
    Return the scheme that will be assigned to requests received through this connector. Default value is "http".
 public boolean getSecure() 
    Return the secure connection flag that will be assigned to requests received through this connector. Default value is "false".
 public Service getService() 
    Return the Service with which we are associated (if any).
 public String getURIEncoding() 
    Return the character encoding to be used for the URI.
 public boolean getUseBodyEncodingForURI() 
    Return the true if the entity body encoding should be used for the URI.
 public boolean getUseIPVHosts() 
    Test if IP-based virtual hosting is enabled.
 public boolean getXpoweredBy() 
    Indicates whether the generation of an X-Powered-By response header for servlet-generated responses is enabled or disabled for this Connector.
 public  void init() throws Exception 
 public  void initialize() throws LifecycleException 
    Initialize this connector (create ServerSocket here!)
 public boolean isAvailable() 
    Is this connector available for processing requests?
 public  void pause() throws LifecycleException 
    Pause the connector.
 public  void postDeregister() 
 public  void postRegister(Boolean registrationDone) 
 public  void preDeregister() throws Exception 
 public ObjectName preRegister(MBeanServer server,
    ObjectName name) throws Exception 
 public  void removeLifecycleListener(LifecycleListener listener) 
    Remove a lifecycle event listener from this component.
 public  void removeProperty(String name) 
    remove a configured property.
 public  void resume() throws LifecycleException 
    Pause the connector.
 public  void setAllowTrace(boolean allowTrace) 
    Set the allowTrace flag, to disable or enable the TRACE HTTP method.
 public  void setAttribute(String name,
    Object value) 
    Set a configured property.
 public  void setBufferSize(int bufferSize) 
Deprecated!
    Set the input buffer size for this Connector.
 public  void setContainer(Container container) 
    Set the Container used for processing requests received by this Connector.
 public  void setController(ObjectName controller) 
 public  void setEmptySessionPath(boolean emptySessionPath) 
    Set the "empty session path" flag.
 public  void setEnableLookups(boolean enableLookups) 
    Set the "enable DNS lookups" flag.
 public  void setMaxPostSize(int maxPostSize) 
    Set the maximum size of a POST which will be automatically parsed by the container.
 public  void setMaxSavePostSize(int maxSavePostSize) 
    Set the maximum size of a POST which will be saved by the container during authentication.
 public  void setPort(int port) 
    Set the port number on which we listen for requests.
 public boolean setProperty(String name,
    String value) 
    Set a configured property.
 public  void setProtocol(String protocol) 
    Set the Coyote protocol which will be used by the connector.
 public  void setProtocolHandlerClassName(String protocolHandlerClassName) 
    Set the class name of the Coyote protocol handler which will be used by the connector.
 public  void setProxyName(String proxyName) 
    Set the proxy server name for this Connector.
 public  void setProxyPort(int proxyPort) 
    Set the proxy server port for this Connector.
 public  void setRedirectPort(int redirectPort) 
    Set the redirect port number.
 public  void setScheme(String scheme) 
    Set the scheme that will be assigned to requests received through this connector.
 public  void setSecure(boolean secure) 
    Set the secure connection flag that will be assigned to requests received through this connector.
 public  void setService(Service service) 
    Set the Service with which we are associated (if any).
 public  void setURIEncoding(String URIEncoding) 
    Set the URI encoding to be used for the URI.
 public  void setUseBodyEncodingForURI(boolean useBodyEncodingForURI) 
    Set if the entity body encoding should be used for the URI.
 public  void setUseIPVHosts(boolean useIPVHosts) 
    Enable the use of IP-based virtual hosting.
 public  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.
 public  void start() throws LifecycleException 
    Begin processing requests via this Connector.
 public  void stop() throws LifecycleException 
    Terminate processing requests via this Connector.