public abstract class ValveBase extends Object implements Contained, Valve, MBeanRegistration
invoke()
method to provide the required functionality, and MAY
implement the Lifecycle
interface to provide configuration
management and lifecycle support.Modifier and Type | Field and Description |
---|---|
protected Container |
container
The Container whose pipeline this Valve is a component of.
|
protected ObjectName |
controller |
protected String |
domain |
protected static String |
info
Descriptive information about this Valve implementation.
|
protected MBeanServer |
mserver |
protected Valve |
next
The next Valve in the pipeline this Valve is a component of.
|
protected ObjectName |
oname |
Constructor and Description |
---|
ValveBase() |
Modifier and Type | Method and Description |
---|---|
void |
backgroundProcess()
Execute a periodic task, such as reloading, etc.
|
ObjectName |
createObjectName(String domain,
ObjectName parent) |
void |
event(Request request,
Response response,
HttpEvent event)
Process a Comet event.
|
Container |
getContainer()
Return the Container with which this Valve is associated, if any.
|
ObjectName |
getContainerName() |
ObjectName |
getController() |
String |
getDomain() |
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. |
ObjectName |
getObjectName() |
ObjectName |
getParentName(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(Boolean registrationDone) |
void |
preDeregister() |
ObjectName |
preRegister(MBeanServer server,
ObjectName name) |
void |
setContainer(Container container)
Set the Container with which this Valve is associated, if any.
|
void |
setController(ObjectName controller) |
void |
setNext(Valve valve)
Set the Valve that follows this one in the pipeline it is part of.
|
void |
setObjectName(ObjectName oname) |
String |
toString()
Return a String rendering of this object.
|
protected Container container
protected static String info
protected Valve next
protected String domain
protected ObjectName oname
protected MBeanServer mserver
protected ObjectName controller
public Container getContainer()
getContainer
in interface Contained
public void setContainer(Container container)
setContainer
in interface Contained
container
- The new associated containerpublic String getInfo()
public Valve getNext()
null
if this
is the last Valve in the pipeline.public void setNext(Valve valve)
public void backgroundProcess()
backgroundProcess
in interface Valve
public abstract void invoke(Request request, Response response) throws 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 createdIOException
- if an input/output error occursjavax.servlet.ServletException
- if a servlet error occurspublic void event(Request request, Response response, HttpEvent event) throws 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 processedIOException
- if an input/output error occurs, or is thrown
by a subsequently invoked Valve, Filter, or Servletjavax.servlet.ServletException
- if a servlet error occurs, or is thrown
by a subsequently invoked Valve, Filter, or Servletpublic String toString()
public ObjectName getObjectName()
public void setObjectName(ObjectName oname)
public String getDomain()
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
preRegister
in interface MBeanRegistration
Exception
public void postRegister(Boolean registrationDone)
postRegister
in interface MBeanRegistration
public void preDeregister() throws Exception
preDeregister
in interface MBeanRegistration
Exception
public void postDeregister()
postDeregister
in interface MBeanRegistration
public ObjectName getController()
public void setController(ObjectName controller)
public ObjectName getParentName(ObjectName valveName)
valveName
- The valve namepublic ObjectName createObjectName(String domain, ObjectName parent) throws MalformedObjectNameException
MalformedObjectNameException
public ObjectName getContainerName()
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.