
com.cookingfox.lapasse.api.command.handler.RxSingleCommandHandler Maven / Gradle / Ivy
The newest version!
package com.cookingfox.lapasse.api.command.handler;
import com.cookingfox.lapasse.api.command.Command;
import com.cookingfox.lapasse.api.event.Event;
import com.cookingfox.lapasse.api.state.State;
import rx.Single;
/**
* Command handler that returns an Rx Single for the event it produces.
*
* @param The concrete type of the state object.
* @param The concrete command type that this handler will handle.
* @param The concrete event type that this handler will produce.
*/
public interface RxSingleCommandHandler
extends CommandHandler {
/**
* Handle a command and return an Rx Single.
*
* @param state The current state object.
* @param command The command object to handle.
* @return An Rx Single for the event.
*/
Single handle(S state, C command);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy