net.arnx.jsonic.web
Class Container
java.lang.Object
net.arnx.jsonic.web.Container
- Direct Known Subclasses:
- GuiceContainer, S2Container, SpringContainer
public class Container
- extends Object
|
Method Summary |
void |
debug(String message)
|
void |
debug(String message,
Throwable e)
|
void |
destory()
|
void |
end(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
error(String message,
Throwable e)
|
Object |
execute(JSON json,
Object component,
Method method,
List<?> params)
|
protected Class<?> |
findClass(String name)
|
Object |
getComponent(String className)
|
Method |
getMethod(Object component,
String methodName,
List<?> params)
|
void |
init(javax.servlet.http.HttpServlet servlet)
|
boolean |
isDebugMode()
|
protected boolean |
limit(Class<?> c,
Method method)
|
Object |
postinvoke(Object component,
Method method,
Object result)
Called after invoked the target method. |
Object[] |
preinvoke(Object component,
Method method,
Object... params)
Called before invoking the target method. |
void |
start(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
warn(String message)
|
void |
warn(String message,
Throwable e)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
debug
public Boolean debug
init
public String init
destroy
public String destroy
encoding
public String encoding
expire
public Boolean expire
namingConversion
public boolean namingConversion
processor
public Class<? extends JSON> processor
config
protected javax.servlet.ServletConfig config
context
protected javax.servlet.ServletContext context
servlet
protected javax.servlet.http.HttpServlet servlet
Container
public Container()
init
public void init(javax.servlet.http.HttpServlet servlet)
throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
start
public void start(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Throws:
javax.servlet.ServletException
IOException
getComponent
public Object getComponent(String className)
throws Exception
- Throws:
Exception
getMethod
public Method getMethod(Object component,
String methodName,
List<?> params)
throws NoSuchMethodException
- Throws:
NoSuchMethodException
preinvoke
public Object[] preinvoke(Object component,
Method method,
Object... params)
throws Exception
- Called before invoking the target method.
- Parameters:
component - The target instance.method - The invoking method.params - The parameters before processing of the target method.
- Returns:
- The parameters before processing.
- Throws:
Exception
execute
public Object execute(JSON json,
Object component,
Method method,
List<?> params)
throws Exception
- Throws:
Exception
postinvoke
public Object postinvoke(Object component,
Method method,
Object result)
throws Exception
- Called after invoked the target method.
- Parameters:
component - The target instance.method - The invoked method.result - The returned value of the target method call.
- Returns:
- The returned value after processed.
- Throws:
Exception
end
public void end(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Throws:
javax.servlet.ServletException
IOException
destory
public void destory()
findClass
protected Class<?> findClass(String name)
throws ClassNotFoundException
- Throws:
ClassNotFoundException
limit
protected boolean limit(Class<?> c,
Method method)
isDebugMode
public boolean isDebugMode()
debug
public void debug(String message)
debug
public void debug(String message,
Throwable e)
warn
public void warn(String message)
warn
public void warn(String message,
Throwable e)
error
public void error(String message,
Throwable e)