com.bradmcevoy.http
Interface ConditionalCompatibleResource


public interface ConditionalCompatibleResource

Resources may implement this, to allow them to decide dynamically whether to support particular HTTP methods. Note that this must not be used for authorisation, use the authorise method on Resource instead. This should only be used to determine whether a resource permits a certain http method regardless of user or application state. Ie is should reflect a configuration choice, and as such be static for the lifetime of the application

Author:
brad

Method Summary
 boolean isCompatible(Request.Method m)
          Return whether or not this resource might be compatible with the given HTTP method.
 

Method Detail

isCompatible

boolean isCompatible(Request.Method m)
Return whether or not this resource might be compatible with the given HTTP method. Note that a resource MUST also implement the corresponding milton interface (E.g. GetableResource)

Parameters:
m - - the HTTP method in the current request
Returns:
- false to say that this resource must not handle this request, true to indicate that it might, if it also implements the appropriate method interface


Copyright © 2011. All Rights Reserved.