public class RequestManager extends Object
Constructor and Description |
---|
RequestManager()
Constructs an uninitialized request manager object.
|
RequestManager(WebApp webapp)
Constructs a new request manager for the given web app.
|
Modifier and Type | Method and Description |
---|---|
Object |
deserializeArgument(Object[] actuals,
Class<?> type,
String name,
boolean is_array,
boolean is_collection,
Class<? extends Collection<?>> collection_type)
Deserializes an argument, i.e.
|
<E> E |
deserializeArgument(Object[] actuals,
Class<E> type,
String name) |
Session |
getEmailSession()
Returns the email session.
|
PatternMatcher |
getPatternmatcher() |
WebApp |
getWebApp()
Returns the web app of this web app request manager.
|
String |
getWebAppURL(boolean secure,
Map<String,String[]> argMap)
Returns the URL prefix for this web app.
|
String |
getWebAppURL(Map<String,String[]> argMap)
Returns the URL prefix for this web app.
|
List<RegisteredMethod> |
getWebMethods()
Returns the list of web methods.
|
String |
getWebSiteURL(boolean secure)
Returns the URL prefix for the web site.
|
void |
introspectWebAppClass(Class<? extends WebApp> webapp_class)
Finds the web methods for the given web app class.
|
(package private) void |
invoke(Method m,
Object thisobj,
Object[] args)
Invokes the given web/handler method.
|
Object |
invokeHandlerMethod(AbstractHandler handler,
String referer)
Invokes the handler
run method. |
Object |
invokeHandlerValidationMethod(SubmitHandler handler) |
URL |
makeURL(boolean secure,
Map<String,?> webapp_params,
String method,
Object... args)
Generates a URL for the given web method within the same web site.
|
URL |
makeURL(Map<String,?> webapp_params,
String method,
Object... args)
Generates a URL for the given web method within the same web site.
|
URL |
makeURL(String method,
Object... args)
Generates a URL for the given web method within the same web site.
|
static String |
makeURLArg(Object arg)
Converts a single web method argument into its string representation.
|
(package private) Object[] |
match(RegisteredMethod rm,
String path)
Checks whether the given method matches the given path and builds
argument array (combined from the path parameters and ordinary servlet
parameters).
|
boolean |
matches(String path)
Returns true if this web app may match requests to the given url
|
public RequestManager()
public RequestManager(WebApp webapp)
public Object deserializeArgument(Object[] actuals, Class<?> type, String name, boolean is_array, boolean is_collection, Class<? extends Collection<?>> collection_type)
public Session getEmailSession()
public PatternMatcher getPatternmatcher()
public WebApp getWebApp()
public String getWebAppURL(boolean secure, Map<String,String[]> argMap)
secure
- if true, use https
in the URL, otherwise use
http
public String getWebAppURL(Map<String,String[]> argMap)
public List<RegisteredMethod> getWebMethods()
public String getWebSiteURL(boolean secure)
secure
- if true, use https
in the URL otherwise use
http
public void introspectWebAppClass(Class<? extends WebApp> webapp_class)
public Object invokeHandlerMethod(AbstractHandler handler, String referer)
run
method.public Object invokeHandlerValidationMethod(SubmitHandler handler)
public URL makeURL(boolean secure, Map<String,?> webapp_params, String method, Object... args)
public URL makeURL(Map<String,?> webapp_params, String method, Object... args)
https
if the current request is on a secure
connection.public URL makeURL(String method, Object... args)
https
if the current request is on a secure
connection.public static String makeURLArg(Object arg)
Object[] match(RegisteredMethod rm, String path)
public boolean matches(String path)
Copyright © 2008-2012 Anders Møller & Mathias Schwarz.