Compare commits
12 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 7897d38412 | |||
| db2335c259 | |||
| 3e053480ed | |||
| 6d021c06be | |||
| 7999175590 | |||
| a00f8d9449 | |||
| cb4e1e607b | |||
| 4e9da9c530 | |||
| b971d50175 | |||
| a10117f686 | |||
| 8451aae083 | |||
| c157c80036 |
@@ -28,15 +28,16 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.jetbrains:annotations:26.0.1")
|
||||
compileOnly("org.jetbrains:annotations:26.0.2-1")
|
||||
implementation("com.r35157.nenjim:hubd-api:0.1-dev")
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain { languageVersion.set(JavaLanguageVersion.of(24)) }
|
||||
toolchain { languageVersion.set(JavaLanguageVersion.of(25)) }
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
options.release.set(24)
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
options.release.set(25)
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
||||
3
build.sh
3
build.sh
@@ -1,3 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
export VERSION=$(git describe --tags --exact-match 2>/dev/null \
|
||||
|| git symbolic-ref --short -q HEAD \
|
||||
|| git rev-parse --short HEAD)
|
||||
|
||||
3
clean.sh
3
clean.sh
@@ -1 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
./gradlew clean ; rm -rf build
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
org.gradle.java.installations.auto-detect=true
|
||||
org.gradle.java.installations.fromEnv=JAVA_HOME
|
||||
org.gradle.java.installations.paths=/usr/local/software/java/jfx-24
|
||||
org.gradle.java.installations.paths=/usr/local/software/java/jfx-25
|
||||
org.gradle.java.installations.auto-download=false
|
||||
org.gradle.configuration-cache=true
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
export VERSION=$(git describe --tags --exact-match 2>/dev/null \
|
||||
|| git symbolic-ref --short -q HEAD \
|
||||
|| git rev-parse --short HEAD)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
export VERSION=$(git describe --tags --exact-match 2>/dev/null \
|
||||
|| git symbolic-ref --short -q HEAD \
|
||||
|| git rev-parse --short HEAD)
|
||||
|
||||
27
src/main/java/com/r35157/nenjim/kicker/NenjimKicker.java
Normal file
27
src/main/java/com/r35157/nenjim/kicker/NenjimKicker.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package com.r35157.nenjim.kicker;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public interface NenjimKicker {
|
||||
/**
|
||||
* Starts a process based on the provided fully qualified interface name.
|
||||
* The actual implementation that is run is bound according to the Context.
|
||||
*
|
||||
* @param fqInterfaceName the fully qualified interface name for the actual class to start as a process. The interface must extend the {@code NenjimProcess} interface.
|
||||
*/
|
||||
void startProcess(@NotNull String fqInterfaceName);
|
||||
|
||||
/**
|
||||
* Provides a map of all running processes managed by the NenjimHub, keyed by the processId.
|
||||
*
|
||||
* @return a map of {@code NenjimProcess} running processes
|
||||
*/
|
||||
@NotNull HashMap<Integer, NenjimProcess> getRunningProcesses();
|
||||
|
||||
/**
|
||||
* A no-operation (noop). This method does nothing.
|
||||
*/
|
||||
void noop();
|
||||
}
|
||||
14
src/main/java/com/r35157/nenjim/kicker/NenjimProcess.java
Normal file
14
src/main/java/com/r35157/nenjim/kicker/NenjimProcess.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.r35157.nenjim.kicker;
|
||||
|
||||
import com.r35157.nenjim.hubd.Context;
|
||||
import com.r35157.nenjim.hubd.NenjimHub;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface NenjimProcess {
|
||||
void run() throws Exception;
|
||||
|
||||
default void setContext(@NotNull Context context) {};
|
||||
default void setHub(@NotNull NenjimHub hub) {};
|
||||
|
||||
@NotNull String getName();
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package com.r35157.nenjim.kicker;
|
||||
|
||||
public interface SomeInterface {
|
||||
String concat(String x, String y);
|
||||
void divideByZero() throws ArithmeticException;
|
||||
}
|
||||
Reference in New Issue
Block a user