public DaemonCancelForwarder(final Dispatch<? super Cancel> dispatch, BuildCancellationToken cancellationToken, final IdGenerator<?> idGenerator) {
this.cancellationToken = cancellationToken;
cancellationCallback = new Runnable() {
public void run() {
LOGGER.info("Request daemon to cancel build...");
dispatch.dispatch(new Cancel(idGenerator.generateId()));
}
};
}