com.dyuproject.web.rest.service
Class AnnotatedMethodResource

java.lang.Object
  extended by com.dyuproject.web.rest.service.AnnotatedMethodResource
All Implemented Interfaces:
Resource

public class AnnotatedMethodResource
extends Object
implements Resource

Wraps the methods of a service to be invoked for request handling.

Author:
David Yu

Field Summary
 
Fields inherited from interface com.dyuproject.web.rest.service.Resource
DELETE, GET, POST, PUT
 
Constructor Summary
AnnotatedMethodResource(Service service, Method serviceMethod, String httpMethod)
           
 
Method Summary
 void destroy(WebContext webContext)
           
 String getHttpMethod()
           
 Service getService()
           
 Method getServiceMethod()
           
 void handle()
           
 void init(WebContext webContext)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnnotatedMethodResource

public AnnotatedMethodResource(Service service,
                               Method serviceMethod,
                               String httpMethod)
Method Detail

init

public void init(WebContext webContext)
Specified by:
init in interface Resource

destroy

public void destroy(WebContext webContext)
Specified by:
destroy in interface Resource

getService

public Service getService()

getServiceMethod

public Method getServiceMethod()

getHttpMethod

public String getHttpMethod()
Specified by:
getHttpMethod in interface Resource

handle

public void handle()
            throws ServletException,
                   IOException
Specified by:
handle in interface Resource
Throws:
ServletException
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.