NoIssue: Add some interfaces
This commit is contained in:
@@ -29,6 +29,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
compileOnly("org.jetbrains:annotations:26.0.2-1")
|
||||
implementation("com.r35157.nenjim:hubd-api:0.1-dev")
|
||||
}
|
||||
|
||||
java {
|
||||
|
||||
25
src/main/java/com/r35157/nenjim/kicker/Kicker.java
Normal file
25
src/main/java/com/r35157/nenjim/kicker/Kicker.java
Normal 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();
|
||||
}
|
||||
13
src/main/java/com/r35157/nenjim/kicker/NenjimProcess.java
Normal file
13
src/main/java/com/r35157/nenjim/kicker/NenjimProcess.java
Normal 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();
|
||||
}
|
||||
Reference in New Issue
Block a user