com.dyuproject.web.rest.service
Class RESTServiceContext

java.lang.Object
  extended by com.dyuproject.web.rest.WebContext
      extended by com.dyuproject.web.rest.service.RESTServiceContext

public class RESTServiceContext
extends WebContext

The application context using REST services and resources

Author:
David Yu

Field Summary
 
Fields inherited from class com.dyuproject.web.rest.WebContext
DEFAULT_ENV_LOCATION, DEFAULT_MIME_LOCATION, DISPATCH_ATTR, PATH_SUFFIX_ATTR, PATHINFO_ARRAY_ATTR, PATHINFO_INDEX_ATTR, SESSION_ENABLED
 
Constructor Summary
RESTServiceContext()
           
 
Method Summary
 void addInterceptor(String path, Interceptor interceptor)
           
 void addResource(String path, Resource resource)
           
 void addService(Service service)
           
protected  void destroy()
           
protected  void handlePath(RequestContext requestContext)
           
protected  void handleRoot(RequestContext requestContext)
           
protected  void init()
           
protected  void preConfigure(ServletConfig config)
           
 void setInterceptors(Map<String,Interceptor> interceptors)
           
 void setResources(Map<String,Resource> resources)
           
 void setServices(List<Service> services)
           
 void setServices(Service[] services)
           
 
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
 

Constructor Detail

RESTServiceContext

public RESTServiceContext()
Method Detail

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.