Java Globus API: Class CertificatesValve

org.globus.tomcat.catalina.valves
Class CertificatesValve

org.globus.tomcat.catalina.valves.CertificatesValve

public final class CertificatesValve


Field Summary
protected  boolean certificates
          Are certificates required for authentication by this web application?
protected  int debug
          The debugging detail level for this component.
protected static String info
          The descriptive information related to this implementation.
protected  org.apache.catalina.util.LifecycleSupport lifecycle
          The lifecycle event support for this component.
protected static org.apache.catalina.util.StringManager sm
          The StringManager for this package.
protected  boolean started
          Has this component been started yet?
 
Constructor Summary
CertificatesValve()
           
 
Method Summary
 void addLifecycleListener(org.apache.catalina.LifecycleListener listener)
          Add a LifecycleEvent listener to this component.
protected  void expose(org.apache.catalina.Request request, org.apache.catalina.Request actual)
          Expose the certificate chain for this request, if there is one.
 org.apache.catalina.LifecycleListener[] findLifecycleListeners()
           
 int getDebug()
          Return the debugging detail level for this component.
 String getInfo()
          Return descriptive information about this Valve implementation.
 void invoke(org.apache.catalina.Request request, org.apache.catalina.Response response, org.apache.catalina.ValveContext context)
          Expose the certificates chain if one was included on this request.
protected  void log(String message)
          Log a message on the Logger associated with our Container (if any).
protected  void log(String message, Throwable throwable)
          Log a message on the Logger associated with our Container (if any).
 void removeLifecycleListener(org.apache.catalina.LifecycleListener listener)
          Remove a LifecycleEvent listener from this component.
 void setDebug(int debug)
          Set the debugging detail level for this component.
 void start()
          Prepare for the beginning of active use of the public methods of this component.
 void stop()
          Gracefully terminate the active use of the public methods of this component.
protected  void verify(org.apache.catalina.Request request, org.apache.catalina.Request actual)
          Verify that a client certificate chain exists if our web application is doing client certificate authentication.
 

Field Detail

certificates

protected boolean certificates
Are certificates required for authentication by this web application?

debug

protected int debug
The debugging detail level for this component.

info

protected static final String info
The descriptive information related to this implementation.

lifecycle

protected org.apache.catalina.util.LifecycleSupport lifecycle
The lifecycle event support for this component.

sm

protected static org.apache.catalina.util.StringManager sm
The StringManager for this package.

started

protected boolean started
Has this component been started yet?
Constructor Detail

CertificatesValve

public CertificatesValve()
Method Detail

getDebug

public int getDebug()
Return the debugging detail level for this component.

setDebug

public void setDebug(int debug)
Set the debugging detail level for this component.

getInfo

public String getInfo()
Return descriptive information about this Valve implementation.

invoke

public void invoke(org.apache.catalina.Request request,
                   org.apache.catalina.Response response,
                   org.apache.catalina.ValveContext context)
            throws IOException,
                   javax.servlet.ServletException
Expose the certificates chain if one was included on this request.
Parameters:
request - The servlet request to be processed
response - The servlet response to be created
context - The valve context used to invoke the next valve in the current processing pipeline
Throws:
IOException - if an input/output error occurs
ServletException - if a servlet error occurs

addLifecycleListener

public void addLifecycleListener(org.apache.catalina.LifecycleListener listener)
Add a LifecycleEvent listener to this component.
Parameters:
listener - The listener to add

removeLifecycleListener

public void removeLifecycleListener(org.apache.catalina.LifecycleListener listener)
Remove a LifecycleEvent listener from this component.
Parameters:
listener - The listener to remove

findLifecycleListeners

public org.apache.catalina.LifecycleListener[] findLifecycleListeners()

start

public void start()
           throws org.apache.catalina.LifecycleException
Prepare for the beginning of active use of the public methods of this component. This method should be called before any of the public methods of this component are utilized. It should also send a LifecycleEvent of type START_EVENT to any registered listeners.
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 org.apache.catalina.LifecycleException
Gracefully terminate the active use of the public methods of this component. This method should be the last one called on a given instance of this component. It should also send a LifecycleEvent of type STOP_EVENT to any registered listeners.
Throws:
IllegalStateException - if this component has not been started
LifecycleException - if this component detects a fatal error that needs to be reported

expose

protected void expose(org.apache.catalina.Request request,
                      org.apache.catalina.Request actual)
Expose the certificate chain for this request, if there is one.
Parameters:
request - The possibly wrapped Request being processed
actual - The actual underlying Request object

log

protected void log(String message)
Log a message on the Logger associated with our Container (if any).
Parameters:
message - Message to be logged

log

protected void log(String message,
                   Throwable throwable)
Log a message on the Logger associated with our Container (if any).
Parameters:
message - Message to be logged
throwable - Associated exception

verify

protected void verify(org.apache.catalina.Request request,
                      org.apache.catalina.Request actual)
Verify that a client certificate chain exists if our web application is doing client certificate authentication.
Parameters:
request - The possibly wrapped Request being processed
actual - The actual underlying Request object