com.dyuproject.web.rest.service
Class PathHandler

java.lang.Object
  extended by com.dyuproject.web.rest.AbstractLifeCycle
      extended by com.dyuproject.web.rest.service.PathHandler
All Implemented Interfaces:
LifeCycle

public final class PathHandler
extends AbstractLifeCycle

Contains all the logic to handle the REST requests. Wraps the Resource and Interceptor. Wildcard interceptor supported.

Author:
David Yu
Date created:
Dec 3, 2008

Field Summary
static String PARAM
           
static String ROOT
           
 
Constructor Summary
PathHandler()
           
 
Method Summary
protected  void destroy()
           
 String getId()
           
 void handle(String[] pathInfo, RequestContext rc)
           
protected  void init()
           
static boolean isPathParameter(String id)
           
 boolean map(String path, Interceptor interceptor)
           
 PathHandler map(String path, Resource resource)
           
 
Methods inherited from class com.dyuproject.web.rest.AbstractLifeCycle
destroy, getWebContext, init, isDestroyed, isInitialized, newObjectInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT

public static final String ROOT
See Also:
Constant Field Values

PARAM

public static final String PARAM
See Also:
Constant Field Values
Constructor Detail

PathHandler

public PathHandler()
Method Detail

isPathParameter

public static boolean isPathParameter(String id)

init

protected void init()
Specified by:
init in class AbstractLifeCycle

destroy

protected void destroy()
Overrides:
destroy in class AbstractLifeCycle

getId

public String getId()

map

public boolean map(String path,
                   Interceptor interceptor)

map

public PathHandler map(String path,
                       Resource resource)

handle

public void handle(String[] pathInfo,
                   RequestContext rc)
            throws ServletException,
                   IOException
Throws:
ServletException
IOException


Copyright © 2008-2013. All Rights Reserved.