View Javadoc

1   package com.bradmcevoy.http;
2   
3   import com.bradmcevoy.http.exceptions.BadRequestException;
4   import com.bradmcevoy.http.exceptions.ConflictException;
5   import com.bradmcevoy.http.exceptions.NotAuthorizedException;
6   
7   /**
8    *
9    * @author brad
10   */
11  public interface Handler {
12  
13      /**
14       * 
15       * @return - the http methods supported by this handler. Must be all upper case.
16       */
17      String[] getMethods();
18  
19      void process( HttpManager httpManager, Request request, Response response ) throws ConflictException, NotAuthorizedException, BadRequestException;
20  
21      /**
22       *
23       * @param res
24       * @return - true if the given resource is compatible with this method
25       */
26      boolean isCompatible( Resource res );
27  
28  }