com.dyuproject.web.rest.service
Class AnnotatedMethodResource

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

public final class AnnotatedMethodResource
extends Object
implements Resource

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

Author:
David Yu
Date created:
Dec 3, 2008

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(RequestContext rc)
           
 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 LifeCycle

destroy

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

getService

public Service getService()

getServiceMethod

public Method getServiceMethod()

getHttpMethod

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

handle

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2013. All Rights Reserved.