Interface TaskRequest

  • All Superinterfaces:
    CarrotTask, Serializable

    public interface TaskRequest
    extends CarrotTask
    Classes implementing this interface can be used to enqueue a Carrot Task and will be used as the argument for the actual TaskRequestHandler. Make sure that your TaskRequest class implementation can be serialized by your chosen Json library. You will need a default no-arg constructor for deserialization.

    While processing, Carrot will lookup the actual TaskRequestHandler in the IoC container or create a new instance using the default constructor. Next, it will call the run method and pass it TaskRequest as argument.