Package com.github.fungal.impl.remote
Class CommunicationServer
java.lang.Object
com.github.fungal.impl.remote.CommunicationServer
- All Implemented Interfaces:
Runnable
The communication server
- Author:
- Jesper Pedersen
-
Constructor Summary
ConstructorsConstructorDescriptionCommunicationServer(KernelImpl kernel, String bindAddress, int bindPort) Constructor -
Method Summary
Modifier and TypeMethodDescriptiongetCommand(String name) Get commandGet command namesvoidregisterCommand(Command command) Register commandvoidrun()Runvoidstart()Startvoidstop()StopvoidunregisterCommand(Command command) Unregister command
-
Constructor Details
-
CommunicationServer
Constructor- Parameters:
kernel- The kernelbindAddress- The bind addressbindPort- The bind port- Throws:
IOException- Thrown if a server socket can not be created
-
-
Method Details
-
registerCommand
Register command- Parameters:
command- The command
-
unregisterCommand
Unregister command- Parameters:
command- The command
-
getCommandNames
Get command names- Returns:
- The command names
-
getCommand
Get command- Parameters:
name- The name of the command- Returns:
- The command
-
start
Start- Throws:
Throwable- Thrown if an error occurs
-
stop
Stop- Throws:
Throwable- Thrown if an error occurs
-
run
public void run()Run
-