|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tomcat.util.handler.TcHandler
public abstract class TcHandler
The lowest level component of Jk ( and hopefully Coyote ). Try to keep it minimal and flexible - add only if you _have_ to add. It is similar in concept and can implement/wrap tomcat3.3 Interceptor, tomcat4.0 Valve, axis Handler, tomcat3.3 Handler, apache2 Hooks etc. Both iterative (Interceptor, Hook ) and recursive ( Valve ) behavior are supported. Named TcHandler because Handler name is too overloaded. The interface allows both stateless and statefull implementations ( like Servlet ).
| Field Summary | |
|---|---|
protected Hashtable |
attributes
|
static int |
ERROR
|
protected int |
id
|
static int |
LAST
|
protected String |
name
|
protected TcHandler |
next
|
static int |
OK
|
| Constructor Summary | |
|---|---|
TcHandler()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Clean up and stop the handler. |
Object |
getAttribute(String name)
Get an attribute. |
int |
getId()
|
String |
getName()
|
void |
init()
Should register the request types it can handle, same style as apache2. |
abstract int |
invoke(TcHandlerCtx tcCtx)
The 'hook' method. |
void |
setAttribute(String name,
Object value)
Base implementation will just save all attributes. |
void |
setId(int id)
Set the id of the worker. |
void |
setName(String s)
Set the name of the handler. |
void |
setNext(TcHandler h)
Catalina-style "recursive" invocation. |
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int OK
public static final int LAST
public static final int ERROR
protected Hashtable attributes
protected TcHandler next
protected String name
protected int id
| Constructor Detail |
|---|
public TcHandler()
| Method Detail |
|---|
public void setName(String s)
public String getName()
public void setId(int id)
public int getId()
public void setNext(TcHandler h)
public void setAttribute(String name,
Object value)
public Object getAttribute(String name)
public void init()
throws IOException
IOException
public void destroy()
throws IOException
IOException
public void start()
throws IOException
IOException
public void stop()
throws IOException
IOException
public abstract int invoke(TcHandlerCtx tcCtx)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||