com.bradmcevoy.http.http11
Class GetHandler

java.lang.Object
  extended by com.bradmcevoy.http.http11.GetHandler
All Implemented Interfaces:
ExistingEntityHandler, Handler, ResourceHandler

public class GetHandler
extends java.lang.Object
implements ExistingEntityHandler


Constructor Summary
GetHandler(Http11ResponseHandler responseHandler, HandlerHelper handlerHelper)
           
 
Method Summary
 java.lang.String[] getMethods()
           
 Range getRange(Request requestInfo)
           
 boolean isCompatible(Resource handler)
           
 void process(HttpManager manager, Request request, Response response)
           
 void processExistingResource(HttpManager manager, Request request, Response response, Resource resource)
           
 void processResource(HttpManager manager, Request request, Response response, Resource r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetHandler

public GetHandler(Http11ResponseHandler responseHandler,
                  HandlerHelper handlerHelper)
Method Detail

process

public void process(HttpManager manager,
                    Request request,
                    Response response)
             throws NotAuthorizedException,
                    ConflictException,
                    BadRequestException
Specified by:
process in interface Handler
Throws:
NotAuthorizedException
ConflictException
BadRequestException

processResource

public void processResource(HttpManager manager,
                            Request request,
                            Response response,
                            Resource r)
                     throws NotAuthorizedException,
                            ConflictException,
                            BadRequestException
Specified by:
processResource in interface ResourceHandler
Throws:
NotAuthorizedException
ConflictException
BadRequestException

processExistingResource

public void processExistingResource(HttpManager manager,
                                    Request request,
                                    Response response,
                                    Resource resource)
                             throws NotAuthorizedException,
                                    BadRequestException,
                                    ConflictException
Specified by:
processExistingResource in interface ExistingEntityHandler
Throws:
NotAuthorizedException
BadRequestException
ConflictException

getRange

public Range getRange(Request requestInfo)

getMethods

public java.lang.String[] getMethods()
Specified by:
getMethods in interface Handler
Returns:
- the http methods supported by this handler. Must be all upper case.

isCompatible

public boolean isCompatible(Resource handler)
Specified by:
isCompatible in interface Handler
Returns:
- true if the given resource is compatible with this method


Copyright © 2011. All Rights Reserved.