org.apache.catalina.connector.warp
Class WarpConnector

java.lang.Object
  |
  +--org.apache.catalina.connector.warp.WarpConnector
All Implemented Interfaces:
Connector, Lifecycle, java.lang.Runnable

public class WarpConnector
extends java.lang.Object
implements Connector, Lifecycle, java.lang.Runnable

Version:
CVS $Id: WarpConnector.java,v 1.11 2001/05/09 23:42:17 craigmcc Exp $
Author:
Pier Fumagalli, Copyright © 1999, 2000 The Apache Software Foundation.

Fields inherited from interface org.apache.catalina.Lifecycle
START_EVENT, STOP_EVENT
 
Constructor Summary
WarpConnector()
           
 
Method Summary
 void addLifecycleListener(LifecycleListener listener)
          Add a lifecycle event listener to this component.
 Request createRequest()
          Create and return a Request object suitable for receiving the contents of a Request from the responsible Container.
 Response createResponse()
          Create and return a Response object suitable for receiving the contents of a Response from the responsible Container.
 int getAcceptCount()
          Return the accept count for this Connector.
 Container getContainer()
          Return the Container used for processing requests received by this Connector.
 boolean getEnableLookups()
          Return the "enable DNS lookups" flag for this Connector.
 ServerSocketFactory getFactory()
          Return the server socket factory used by this Connector.
 java.lang.String getInfo()
          Return descriptive information about this implementation.
 int getPort()
          Return the port number on which we listen for HTTP requests.
 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.
 void log(java.lang.Exception exc)
          Dump information for an Exception.
 void log(java.lang.String msg)
          Dump a log message.
 void removeLifecycleListener(LifecycleListener listener)
          Remove a lifecycle event listener from this component.
 void run()
          Run the acceptor thread, the thread that will wait on the server socket and create new connections.
 void setAcceptCount(int acceptcount)
          Set the accept count for this Connector.
 void setContainer(Container container)
          Set the Container used for processing requests received by this Connector.
 void setEnableLookups(boolean enableLookups)
          Set the "enable DNS lookups" flag for this Connector.
 void setFactory(ServerSocketFactory factory)
          Set the server socket factory used by this Container.
 void setPort(int port)
          Set the port number on which we listen for HTTP requests.
 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 start()
          Begin processing requests via this Connector.
 void stop()
          Terminate processing requests via this Connector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WarpConnector

public WarpConnector()
Method Detail

run

public void run()
Run the acceptor thread, the thread that will wait on the server socket and create new connections.
Specified by:
run in interface java.lang.Runnable

createRequest

public Request createRequest()
Create and return a Request object suitable for receiving the contents of a Request from the responsible Container.
Specified by:
createRequest in interface Connector

createResponse

public Response createResponse()
Create and return a Response object suitable for receiving the contents of a Response from the responsible Container.
Specified by:
createResponse in interface Connector

start

public void start()
           throws LifecycleException
Begin processing requests via this Connector.
Specified by:
start in interface Lifecycle
Following copied from interface: org.apache.catalina.Lifecycle
Throws:
IllegalStateException - if this component has already been started
LifecycleException - if this component detects a fatal error that prevents this component from being used

stop

public void stop()
          throws LifecycleException
Terminate processing requests via this Connector.
Specified by:
stop in interface Lifecycle
Following copied from interface: org.apache.catalina.Lifecycle
Throws:
IllegalStateException - if this component has not been started
LifecycleException - if this component detects a fatal error that needs to be reported

addLifecycleListener

public void addLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component.
Specified by:
addLifecycleListener in interface Lifecycle
Following copied from interface: org.apache.catalina.Lifecycle
Parameters:
listener - The listener to add

removeLifecycleListener

public void removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component.
Specified by:
removeLifecycleListener in interface Lifecycle
Following copied from interface: org.apache.catalina.Lifecycle
Parameters:
listener - The listener to remove

getInfo

public java.lang.String getInfo()
Return descriptive information about this implementation.
Specified by:
getInfo in interface Connector

getRedirectPort

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.
Specified by:
getRedirectPort in interface Connector

setRedirectPort

public void setRedirectPort(int redirectPort)
Set the redirect port number.
Specified by:
setRedirectPort in interface Connector
Parameters:
redirectPort - The redirect port number (non-SSL to SSL)

getSecure

public boolean getSecure()
Return the secure connection flag that will be assigned to requests received through this connector. Default value is "false".
NOTE: For protocols such as WARP this is pointless, as we will only know at request time wether the received request is secure or not. Security is handled by an HTTP stack outside this JVM, and this can be (like with Apache) handling both HTTP and HTTPS requests.
Specified by:
getSecure in interface Connector

setSecure

public void setSecure(boolean secure)
Set the secure connection flag that will be assigned to requests received through this connector.
NOTE: For protocols such as WARP this is pointless, as we will only know at request time wether the received request is secure or not. Security is handled by an HTTP stack outside this JVM, and this can be (like with Apache) handling both HTTP and HTTPS requests.
Specified by:
setSecure in interface Connector
Following copied from interface: org.apache.catalina.Connector
Parameters:
secure - The new secure connection flag

getScheme

public java.lang.String getScheme()
Return the scheme that will be assigned to requests received through this connector. Default value is "http".
NOTE: As noted in the getSecure() and setSecure() methods, for WARP we don't know the scheme of the request until the request is received.
Specified by:
getScheme in interface Connector

setScheme

public void setScheme(java.lang.String scheme)
Set the scheme that will be assigned to requests received through this connector.
NOTE: As noted in the getSecure() and setSecure() methods, for WARP we don't know the scheme of the request until the request is received.
Specified by:
setScheme in interface Connector
Following copied from interface: org.apache.catalina.Connector
Parameters:
scheme - The new scheme

getContainer

public Container getContainer()
Return the Container used for processing requests received by this Connector.
Specified by:
getContainer in interface Connector

setContainer

public void setContainer(Container container)
Set the Container used for processing requests received by this Connector.
Specified by:
setContainer in interface Connector
Following copied from interface: org.apache.catalina.Connector
Parameters:
container - The new Container to use

getEnableLookups

public boolean getEnableLookups()
Return the "enable DNS lookups" flag for this Connector.
Specified by:
getEnableLookups in interface Connector

setEnableLookups

public void setEnableLookups(boolean enableLookups)
Set the "enable DNS lookups" flag for this Connector.
Specified by:
setEnableLookups in interface Connector
Following copied from interface: org.apache.catalina.Connector
Parameters:
enableLookups - The new "enable DNS lookups" flag value

getFactory

public ServerSocketFactory getFactory()
Return the server socket factory used by this Connector.
Specified by:
getFactory in interface Connector

setFactory

public void setFactory(ServerSocketFactory factory)
Set the server socket factory used by this Container.
Specified by:
setFactory in interface Connector
Following copied from interface: org.apache.catalina.Connector
Parameters:
factory - The new server socket factory

getPort

public int getPort()
Return the port number on which we listen for HTTP requests.

setPort

public void setPort(int port)
Set the port number on which we listen for HTTP requests.

getAcceptCount

public int getAcceptCount()
Return the accept count for this Connector.

setAcceptCount

public void setAcceptCount(int acceptcount)
Set the accept count for this Connector.
Parameters:
acceptcount - The new accept count

log

public void log(java.lang.String msg)
Dump a log message.

log

public void log(java.lang.Exception exc)
Dump information for an Exception.


Copyright ? 2000 Apache Software Foundation. All Rights Reserved.