com.dyuproject.web.rest.service
Class PathHandler

java.lang.Object
  extended by com.dyuproject.web.rest.service.PathHandler

public class PathHandler
extends Object

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

Author:
David Yu

Field Summary
static String PARAM
           
static String ROOT
           
 
Constructor Summary
PathHandler()
           
 
Method Summary
 void destroy()
           
 String getId()
           
 void handle(int index, String[] pathInfo)
           
 void init()
           
static boolean isPathParameter(String id)
           
 boolean map(String path, Interceptor interceptor)
           
 PathHandler map(String path, Resource resource)
           
 
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

public void init()

destroy

public void destroy()

getId

public String getId()

map

public boolean map(String path,
                   Interceptor interceptor)

map

public PathHandler map(String path,
                       Resource resource)

handle

public void handle(int index,
                   String[] pathInfo)
            throws ServletException,
                   IOException
Throws:
ServletException
IOException


Copyright © 2013. All Rights Reserved.