package riomhaire.lti.core.model.interfaces;

/**
 * Defines  execute command on message P within environment E returning T
 *
 * @param <T> What object is returned by the command
 * @param <E> WHat execution environment is to be used (usually some form of Application Registry)
 * @param <P> The message the command can process
 */
public interface Command<T, E, P> {
    /**
     * This is the signature a message processing command can implement when invoked by the dispatcher
     * @param environment  - usually some form of application registry
     * @param message - what message format the command will get
     * @return some response
     */
    T execute(E environment, P message);
}
