|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.valves.ValveBase
public abstract class ValveBase
Convenience base class for implementations of the Valve interface.
A subclass MUST implement an invoke()
method to provide the required functionality, and MAY
implement the Lifecycle
interface to provide configuration
management and lifecycle support.
Field Summary | |
---|---|
protected Container |
container
The Container whose pipeline this Valve is a component of. |
protected org.jboss.logging.Logger |
containerLog
Container log |
protected javax.management.ObjectName |
controller
|
protected java.lang.String |
domain
|
protected static java.lang.String |
info
Descriptive information about this Valve implementation. |
protected javax.management.MBeanServer |
mserver
|
protected Valve |
next
The next Valve in the pipeline this Valve is a component of. |
protected javax.management.ObjectName |
oname
|
protected static StringManager |
sm
The string manager for this package. |
Constructor Summary | |
---|---|
ValveBase()
|
Method Summary | |
---|---|
void |
backgroundProcess()
Execute a periodic task, such as reloading, etc. |
javax.management.ObjectName |
createObjectName(java.lang.String domain,
javax.management.ObjectName parent)
|
void |
event(Request request,
Response response,
org.jboss.servlet.http.HttpEvent event)
Process a Comet event. |
Container |
getContainer()
Return the Container with which this Valve is associated, if any. |
javax.management.ObjectName |
getContainerName()
|
javax.management.ObjectName |
getController()
|
java.lang.String |
getDomain()
|
java.lang.String |
getInfo()
Return descriptive information about this Valve implementation. |
Valve |
getNext()
Return the next Valve in this pipeline, or null if this
is the last Valve in the pipeline. |
javax.management.ObjectName |
getObjectName()
|
javax.management.ObjectName |
getParentName(javax.management.ObjectName valveName)
From the name, extract the parent object name |
abstract void |
invoke(Request request,
Response response)
The implementation-specific logic represented by this Valve. |
void |
postDeregister()
|
void |
postRegister(java.lang.Boolean registrationDone)
|
void |
preDeregister()
|
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
|
void |
setContainer(Container container)
Set the Container with which this Valve is associated, if any. |
void |
setController(javax.management.ObjectName controller)
|
void |
setNext(Valve valve)
Set the Valve that follows this one in the pipeline it is part of. |
void |
setObjectName(javax.management.ObjectName oname)
|
java.lang.String |
toString()
Return a String rendering of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Container container
protected org.jboss.logging.Logger containerLog
protected static java.lang.String info
protected Valve next
protected static final StringManager sm
protected java.lang.String domain
protected javax.management.ObjectName oname
protected javax.management.MBeanServer mserver
protected javax.management.ObjectName controller
Constructor Detail |
---|
public ValveBase()
Method Detail |
---|
public Container getContainer()
getContainer
in interface Contained
public void setContainer(Container container)
setContainer
in interface Contained
container
- The new associated containerpublic java.lang.String getInfo()
getInfo
in interface Valve
public Valve getNext()
null
if this
is the last Valve in the pipeline.
getNext
in interface Valve
public void setNext(Valve valve)
setNext
in interface Valve
valve
- The new next valvepublic void backgroundProcess()
backgroundProcess
in interface Valve
public abstract void invoke(Request request, Response response) throws java.io.IOException, javax.servlet.ServletException
This method MUST be provided by a subclass.
invoke
in interface Valve
request
- The servlet request to be processedresponse
- The servlet response to be created
java.io.IOException
- if an input/output error occurs
javax.servlet.ServletException
- if a servlet error occurspublic void event(Request request, Response response, org.jboss.servlet.http.HttpEvent event) throws java.io.IOException, javax.servlet.ServletException
event
in interface Valve
request
- The servlet request to be processedresponse
- The servlet response to be processedevent
- The event to be processed
java.io.IOException
- if an input/output error occurs, or is thrown
by a subsequently invoked Valve, Filter, or Servlet
javax.servlet.ServletException
- if a servlet error occurs, or is thrown
by a subsequently invoked Valve, Filter, or Servletpublic java.lang.String toString()
toString
in class java.lang.Object
public javax.management.ObjectName getObjectName()
public void setObjectName(javax.management.ObjectName oname)
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.MBeanRegistration
java.lang.Exception
public void postRegister(java.lang.Boolean registrationDone)
postRegister
in interface javax.management.MBeanRegistration
public void preDeregister() throws java.lang.Exception
preDeregister
in interface javax.management.MBeanRegistration
java.lang.Exception
public void postDeregister()
postDeregister
in interface javax.management.MBeanRegistration
public javax.management.ObjectName getController()
public void setController(javax.management.ObjectName controller)
public javax.management.ObjectName getParentName(javax.management.ObjectName valveName)
valveName
- The valve name
public javax.management.ObjectName createObjectName(java.lang.String domain, javax.management.ObjectName parent) throws javax.management.MalformedObjectNameException
javax.management.MalformedObjectNameException
public javax.management.ObjectName getContainerName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |