001 package org.apache.commons.contract; 002 003 import java.util.Map; 004 005 import org.apache.commons.contract.descriptor.ParameterDescriptor; 006 import org.apache.commons.contract.descriptor.ResultDescriptor; 007 008 public interface Processor { 009 /** 010 * Implement this method to provide the logic of the processor 011 * 012 * @param parameter a map containing the parameters for this process call. 013 * 014 * @return result 015 * @throws Exception 016 */ 017 public Result process(Map parameter, Context context) throws Exception; 018 019 // The following methods describe the behaviour of the processor 020 // The parameters needed 021 public ParameterDescriptor[] getParameterDescriptors(); 022 023 // The states/results that this renderer generates 024 public ResultDescriptor[] getResultDescriptors(); 025 }