Skip to content

ayte-io/java-utility-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ayte :: Utility :: Task

CircleCI Maven Central Code Climate maintainability Sonar Tech Debt

MIT License UPL-1.0 License

A throwing runnable, a non-returning callable.

Coordinates

Project is divided into API (interfaces only), io.ayte.utility.task:api, and implementations, io.ayte.utility.task:kit.

Both artifacts have same module names, io.ayte.utility.task.api and io.ayte.utility.task.kit.

The project itself is part of Ayte utility library collection.

Description

This project contains two interfaces (and related infrastructure) for two interfaces, io.ayte.utility.task.api.Task and io.ayte.utility.task.api.AsyncTask. Task is a Supplier counterpart between runnable and callable: it doesn't return value, but it may throw an exception, so it has signature of

interface Task<E extends Throwable> {
    void execute() throws E;
}

AsyncTask transfers this contract onto returned CompletableFuture, thus being non-generic (since it can pass exception by other means):

interface AsyncTask {
    CompletableFuture<Void> execute();
}

Project is split into two artifacts: io.ayte.utility.task:api contains just interfaces, while io.ayte.utility.task:kit contains both API dependency and helper classes (Tasks and AsyncTasks). Project is fully java 8-compatible, exposing io.ayte.utility.task.api and io.ayte.utility.task.kit modules.

If you're looking for functions that may throw, then you probably want to look into io.ayte.utility.action repository.

Licensing

MIT & UPL-1.0

Ayte Labs, 2019

Do whatever you want.

About

A throwing runnable, a non-returning callable.

Topics

Resources

License

MIT, UPL-1.0 licenses found

Licenses found

MIT
LICENSE-MIT
UPL-1.0
LICENSE-UPL-1.0

Stars

Watchers

Forks

Packages

No packages published

Languages