Rework Java API for Signal/Callable (#833)