# SubServer (SubServers.Host)

net.ME1312.SubServers.Host.Executable

## Class SubServer

- java.lang.Object
- - net.ME1312.SubServers.Host.Executable.SubServer

    public class SubServer
    extends java.lang.Object

Internal SubServer Class

### Constructor Summary

Constructors
Constructor and Description
`SubServer(SubServers host, java.lang.String name, boolean enabled, boolean log, java.lang.String directory, Executable executable, java.lang.String stopcmd)` Creates a SubServer

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `command(java.lang.String command)` Commands the Server
`java.lang.String` `getDirectory()` Get the Server Directory
`SubLogger` `getLogger()` Get Process Logger
`java.lang.String` `getName()` Gets the name of the Server
`java.lang.String` `getStopCommand()` Grab the Command to Stop the Server
`boolean` `isEnabled()` If the Server is Enabled
`boolean` `isLogging()` If the Server is Logging
`boolean` `isRunning()` If the Server is Running
`void` `setEnabled(boolean value)` Set if the Server is Enabled
`void` `setLogging(boolean value)` Set if the Server is Logging
`void` `setStopCommand(java.lang.String value)` Set the Command that Stops the Server
`void` `start(java.util.UUID address)` Starts the Server
`void` `stop()` Stops the Server
`void` `terminate()` Terminates the Server
`void` `waitFor()` Waits for the Server to Stop

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SubServer

    public SubServer(SubServers host,
                     java.lang.String name,
                     boolean enabled,
                     boolean log,
                     java.lang.String directory,
                     Executable executable,
                     java.lang.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 Detail

#### start

    public void start(java.util.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(java.lang.String command)

Commands the Server

Parameters:
  `command` - Command to Send

#### waitFor

    public void waitFor()
                 throws java.lang.InterruptedException

Waits for the Server to Stop

Throws:
  `java.lang.InterruptedException`

#### getName

    public java.lang.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

#### 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 SubLogger getLogger()

Get Process Logger

#### getDirectory

    public java.lang.String getDirectory()

Get the Server Directory

Returns:
  Server Directory

#### getStopCommand

    public java.lang.String getStopCommand()

Grab the Command to Stop the Server

Returns:
  Stop Command

#### setStopCommand

    public void setStopCommand(java.lang.String value)

Set the Command that Stops the Server

Parameters:
  `value` - Value