Skip to content

Allows you to activate the services only when they are in use.

Notifications You must be signed in to change notification settings

360matt-archives/Enabler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Enabler

Maven

<repositories>
    <repository>
        <id>sonatype</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
</repositories>
<dependency>
    <groupId>io.github.360matt</groupId>
    <artifactId>Enabler</artifactId>
    <version>1.1.0-SNAPSHOT</version>
</dependency>

Usage:

Create a empty class extends Enabler:

public class ProjectXEnabler extends Enabler {
    // nothing here
}

Now, add the call in all your project main API class:

Enabler.call(Enabler | ProjectXEnabler);
// Call the Runnable if it exists, only once.

Now, in your main app/jar, register a task:

Enabler.register(Enabler | ProjectXEnabler, Runnable);
// Register Runnable for a class.

About

Allows you to activate the services only when they are in use.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages