001package org.javasimon.console;
002
003/**
004 * Interface describing the binding between an HTTP Request and an {@link Action}
005 * @author gquintana
006 */
007public interface ActionBinding<T extends Action> {
008        /**
009         * Indicates whether this action binding is applicable for this action
010         * context (=HTTP Request)
011         * @param actionContext Action context
012         * @return true if this binding is in charge of this request
013         */
014        public boolean supports(ActionContext actionContext);
015        /**
016         * Create an action of this action context, this method will be
017         * called only if this binding {@link #supports} this context.
018         * @param actionContext Action context
019         * @return New instance of an action
020         */
021        public T create(ActionContext actionContext);
022}