Class SubServerImpl

java.lang.Object
net.ME1312.SubServers.Host.Executable.SubServerImpl

public class SubServerImpl extends Object
Internal SubServer Class
  • Constructor Details

    • SubServerImpl

      public SubServerImpl(ExHost host, String name, boolean enabled, int port, boolean log, String directory, String executable, String stopcmd) throws InvalidServerException
      Creates a SubServer
      Parameters:
      host - SubServers.Host
      name - Name
      enabled - Enabled Status
      log - Logging Status
      directory - Directory
      executable - Executable String
      stopcmd - Stop Command
      Throws:
      InvalidServerException
  • Method Details

    • start

      public void start(UUID address)
      Starts the Server
      Parameters:
      address - External Logging Address
    • stop

      public void stop()
      Stops the Server
    • terminate

      public void terminate()
      Terminates the Server
    • command

      public void command(String command)
      Commands the Server
      Parameters:
      command - Command to Send
    • waitFor

      public void waitFor() throws InterruptedException
      Waits for the Server to Stop
      Throws:
      InterruptedException
    • getName

      public String getName()
      Gets the name of the Server
      Returns:
      Server Name
    • isRunning

      public boolean isRunning()
      If the Server is Running
      Returns:
      Running Status
    • isEnabled

      public boolean isEnabled()
      If the Server is Enabled
      Returns:
      Enabled Status
    • setEnabled

      public void setEnabled(boolean value)
      Set if the Server is Enabled
      Parameters:
      value - Value
    • getPort

      public int getPort()
      Get the Port of the Server
      Returns:
      Server Port Number
    • isLogging

      public boolean isLogging()
      If the Server is Logging
      Returns:
      Logging Status
    • setLogging

      public void setLogging(boolean value)
      Set if the Server is Logging
      Parameters:
      value - Value
    • getLogger

      public SubLoggerImpl getLogger()
      Get Process Logger
    • getPath

      public String getPath()
      Get the Server Directory Path
      Returns:
      Server Directory Path
    • getFullPath

      public String getFullPath()
      Get the Full Server Directory Path
      Returns:
      Full Server Directory Path
    • getExecutable

      public String getExecutable()
      Get the Server's Executable String
      Returns:
      Executable String
    • getStopCommand

      public String getStopCommand()
      Grab the Command to Stop the Server
      Returns:
      Stop Command
    • setStopCommand

      public void setStopCommand(String value)
      Set the Command that Stops the Server
      Parameters:
      value - Value