org.kohsuke.stapler
Class Dispatcher
java.lang.Object
org.kohsuke.stapler.Dispatcher
public abstract class Dispatcher
- extends java.lang.Object
Controls the dispatching of incoming HTTP requests.
- Author:
- Kohsuke Kawaguchi
Field Summary |
static boolean |
TRACE
This flag will activate the evaluation trace. |
Method Summary |
abstract boolean |
dispatch(RequestImpl req,
ResponseImpl rsp,
java.lang.Object node)
Trys to handle the given request and returns true
if it succeeds. |
abstract java.lang.String |
toString()
Diagnostic string that explains this dispatch rule. |
static void |
trace(StaplerRequest req,
StaplerResponse rsp,
java.lang.String msg)
|
static void |
trace(StaplerRequest req,
StaplerResponse rsp,
java.lang.String msg,
java.lang.Object... args)
|
static boolean |
traceable()
|
static void |
traceEval(StaplerRequest req,
StaplerResponse rsp,
java.lang.Object node)
|
static void |
traceEval(StaplerRequest req,
StaplerResponse rsp,
java.lang.Object node,
java.lang.String expression)
|
static void |
traceEval(StaplerRequest req,
StaplerResponse rsp,
java.lang.Object node,
java.lang.String prefix,
java.lang.String suffix)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TRACE
public static boolean TRACE
- This flag will activate the evaluation trace.
It adds the evaluation process as HTTP headers,
and when the evaluation failed, special diagnostic 404 page will be rendered.
Useful for developer assistance.
Dispatcher
public Dispatcher()
dispatch
public abstract boolean dispatch(RequestImpl req,
ResponseImpl rsp,
java.lang.Object node)
throws java.io.IOException,
javax.servlet.ServletException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
- Trys to handle the given request and returns true
if it succeeds. Otherwise false.
We have a few known strategies for handling requests
(for example, one is to try to treat the request as JSP invocation,
another might be try getXXX(), etc) So we use a list of
Dispatcher
and try them one by one until someone
returns true.
- Throws:
java.io.IOException
javax.servlet.ServletException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
toString
public abstract java.lang.String toString()
- Diagnostic string that explains this dispatch rule.
- Overrides:
toString
in class java.lang.Object
traceable
public static boolean traceable()
traceEval
public static void traceEval(StaplerRequest req,
StaplerResponse rsp,
java.lang.Object node)
traceEval
public static void traceEval(StaplerRequest req,
StaplerResponse rsp,
java.lang.Object node,
java.lang.String prefix,
java.lang.String suffix)
traceEval
public static void traceEval(StaplerRequest req,
StaplerResponse rsp,
java.lang.Object node,
java.lang.String expression)
trace
public static void trace(StaplerRequest req,
StaplerResponse rsp,
java.lang.String msg,
java.lang.Object... args)
trace
public static void trace(StaplerRequest req,
StaplerResponse rsp,
java.lang.String msg)
Copyright © 2009. All Rights Reserved.