com.bradmcevoy.http.http11
Class PostHandler

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

public class PostHandler
extends java.lang.Object
implements ExistingEntityHandler


Constructor Summary
PostHandler(Http11ResponseHandler responseHandler, HandlerHelper handlerHelper)
           
 
Method Summary
 java.lang.String[] getMethods()
           
 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

PostHandler

public PostHandler(Http11ResponseHandler responseHandler,
                   HandlerHelper handlerHelper)
Method Detail

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

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


Copyright © 2011. All Rights Reserved.