com.dyuproject.web.rest.service
Class RESTServiceContext
java.lang.Object
com.dyuproject.web.rest.WebContext
com.dyuproject.web.rest.service.RESTServiceContext
public class RESTServiceContext
- extends WebContext
The application context using REST services and resources
- Author:
- David Yu
Methods inherited from class com.dyuproject.web.rest.WebContext |
addAttribute, addViewDispatcher, getAttribute, getCurrentRequestContext, getCurrentSession, getDefaultDispatcher, getJSPDispatcher, getProperty, getRequestContext, getServletContext, getSession, getSession, getViewDispatcher, invalidateSession, isInitialized, isMimeSupported, isSessionEnabled, newObjectInstance, persistSession, service, setAttributes, setEnv, setEnv, setEnv, setEnv, setMime, setMime, setMime, setMime, setViewDispatchers |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESTServiceContext
public RESTServiceContext()
addService
public void addService(Service service)
setServices
public void setServices(Service[] services)
setServices
public void setServices(List<Service> services)
addResource
public void addResource(String path,
Resource resource)
setResources
public void setResources(Map<String,Resource> resources)
addInterceptor
public void addInterceptor(String path,
Interceptor interceptor)
setInterceptors
public void setInterceptors(Map<String,Interceptor> interceptors)
init
protected void init()
- Specified by:
init
in class WebContext
destroy
protected void destroy()
- Specified by:
destroy
in class WebContext
preConfigure
protected void preConfigure(ServletConfig config)
throws Exception
- Specified by:
preConfigure
in class WebContext
- Throws:
Exception
handleRoot
protected void handleRoot(RequestContext requestContext)
throws ServletException,
IOException
- Specified by:
handleRoot
in class WebContext
- Throws:
ServletException
IOException
handlePath
protected void handlePath(RequestContext requestContext)
throws ServletException,
IOException
- Specified by:
handlePath
in class WebContext
- Throws:
ServletException
IOException
Copyright © 2013. All Rights Reserved.