Class TomcatConnector

java.lang.Object
org.jboss.modcluster.container.tomcat.TomcatConnector
All Implemented Interfaces:
Connector

public class TomcatConnector extends Object implements Connector
Connector implementation that wraps a Connector.
Author:
Paul Ferraro
  • Field Details

    • connector

      protected final org.apache.catalina.connector.Connector connector
    • externalAddress

      protected String externalAddress
    • externalPort

      protected Integer externalPort
  • Constructor Details

    • TomcatConnector

      public TomcatConnector(org.apache.catalina.connector.Connector connector)
      Constructs a new TomcatConnector wrapping the specified catalina connector.
      Parameters:
      connector - the catalina connector
    • TomcatConnector

      public TomcatConnector(org.apache.catalina.connector.Connector connector, String externalAddress, Integer externalPort)
      Constructs a new TomcatConnector wrapping the specified catalina connector.
      Parameters:
      connector - the catalina connector
  • Method Details

    • getAddress

      public InetAddress getAddress()
      Description copied from interface: Connector
      Returns the address on which this connector operates.
      Specified by:
      getAddress in interface Connector
      Returns:
      an address
    • setAddress

      public void setAddress(InetAddress address)
      Description copied from interface: Connector
      Sets the address on which this connector operates. Used to set an explicit connector address if undefined or defined as any address.
      Specified by:
      setAddress in interface Connector
      Parameters:
      address - a network interface address
    • getPort

      public int getPort()
      Description copied from interface: Connector
      Returns the port on which this connector operates. Note that the implementations need to account for any form of external port mapping or port offsetting that might have an effect on the configured port.
      Specified by:
      getPort in interface Connector
      Returns:
      a port number on which this connector operates
    • getType

      public Connector.Type getType()
      Description copied from interface: Connector
      Indicates the type of this connector.
      Specified by:
      getType in interface Connector
      Returns:
      a connector type
    • isReverse

      public boolean isReverse()
      Description copied from interface: Connector
      Indicates whether the endpoint of this connector uses a reverse connection to httpd. A reverse connection uses a normal socket connection, instead of the traditional server socket.
      Specified by:
      isReverse in interface Connector
      Returns:
      true, if the endpoint uses a reverse connection, false otherwise
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isAJP

      public static boolean isAJP(org.apache.catalina.connector.Connector connector)
      Indicates whether or not the specified connector use the AJP protocol.
      Parameters:
      connector - a connector
      Returns:
      true, if the specified connector is AJP, false otherwise
    • isAvailable

      public boolean isAvailable()
      Description copied from interface: Connector
      Returns whether this connector available for processing requests.
      Specified by:
      isAvailable in interface Connector
      Returns:
      whether this connector available for processing requests
    • getMaxThreads

      public int getMaxThreads()
      Specified by:
      getMaxThreads in interface Connector
    • getBusyThreads

      public int getBusyThreads()
      Specified by:
      getBusyThreads in interface Connector
    • getProtocolHandlerProperty

      protected Object getProtocolHandlerProperty(String property)
    • getBytesSent

      public long getBytesSent()
      Specified by:
      getBytesSent in interface Connector
    • getBytesReceived

      public long getBytesReceived()
      Specified by:
      getBytesReceived in interface Connector
    • getRequestCount

      public long getRequestCount()
      Specified by:
      getRequestCount in interface Connector
    • getConnectionHandler

      protected Object getConnectionHandler()
    • getRequestGroupInfo

      protected org.apache.coyote.RequestGroupInfo getRequestGroupInfo()
    • getRequestGroupInfo

      protected org.apache.coyote.RequestGroupInfo getRequestGroupInfo(Object connectionHandler)