NoIssue: Add some interfaces

This commit is contained in:
2026-01-24 19:26:11 +01:00
parent 8451aae083
commit a10117f686
3 changed files with 39 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ repositories {
dependencies {
compileOnly("org.jetbrains:annotations:26.0.2-1")
implementation("com.r35157.nenjim:hubd-api:0.1-dev")
}
java {

View File

@@ -0,0 +1,25 @@
package com.r35157.nenjim.kicker;
import java.util.HashMap;
public interface Kicker {
/**
* Starts a process based on the provided fully qualified interface name.
* The actual implementation that is run is binded according to the Context.
*
* @param fqInterfaceName the fully qualified interface name of the process to start. The interface must extend the {@code NenjimProcess} interface.
*/
void startProcess(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
*/
HashMap<Integer, NenjimProcess> getRunningProcesses();
/**
* A no-operation (noop). This method does nothing.
*/
void noop();
}

View File

@@ -0,0 +1,13 @@
package com.r35157.nenjim.kicker;
import com.r35157.nenjim.hubd.Context;
import com.r35157.nenjim.hubd.NenjimHub;
public interface NenjimProcess {
void run() throws Exception;
void setContext(Context context);
void setHub(NenjimHub hub);
String getName();
}