Class CommunicationServer

java.lang.Object
com.github.fungal.impl.remote.CommunicationServer
All Implemented Interfaces:
Runnable

public class CommunicationServer extends Object implements Runnable
The communication server
Author:
Jesper Pedersen
  • Constructor Details

    • CommunicationServer

      public CommunicationServer(KernelImpl kernel, String bindAddress, int bindPort) throws IOException
      Constructor
      Parameters:
      kernel - The kernel
      bindAddress - The bind address
      bindPort - The bind port
      Throws:
      IOException - Thrown if a server socket can not be created
  • Method Details

    • registerCommand

      public void registerCommand(Command command)
      Register command
      Parameters:
      command - The command
    • unregisterCommand

      public void unregisterCommand(Command command)
      Unregister command
      Parameters:
      command - The command
    • getCommandNames

      public Set<String> getCommandNames()
      Get command names
      Returns:
      The command names
    • getCommand

      public Command getCommand(String name)
      Get command
      Parameters:
      name - The name of the command
      Returns:
      The command
    • start

      public void start() throws Throwable
      Start
      Throws:
      Throwable - Thrown if an error occurs
    • stop

      public void stop() throws Throwable
      Stop
      Throws:
      Throwable - Thrown if an error occurs
    • run

      public void run()
      Run
      Specified by:
      run in interface Runnable