Class DataServer

java.lang.Object
net.ME1312.SubData.Server.DataServer

public abstract class DataServer extends Object
SubData Server API Class
  • Field Details

  • Constructor Details

    • DataServer

      public DataServer()
  • Method Details

    • getProtocol

      public abstract DataProtocol getProtocol()
      Get the Protocol for this Server
      Returns:
      Server Protocol
    • getClient

      public abstract DataClient getClient(UUID id)
      Grabs a Client from the Network
      Parameters:
      id - Client ID
      Returns:
      Client
    • getClients

      public abstract Map<UUID,? extends DataClient> getClients()
      Grabs all the Clients on the Network
      Returns:
      Client Map
    • removeClient

      public abstract void removeClient(DataClient client) throws IOException
      Remove a Client from the Network
      Parameters:
      client - Client to Kick
      Throws:
      IOException
    • removeClient

      public abstract void removeClient(UUID id) throws IOException
      Remove a Client from the Network
      Parameters:
      id - Client ID
      Throws:
      IOException
    • whitelist

      public void whitelist(String address)
      Allow Access from an Address (Per-Server)
      Parameters:
      address - Address to allow
    • unwhitelist

      public void unwhitelist(String address)
      Revoke Access from an Address (Per-Server)
      Parameters:
      address - Address to deny
    • close

      public abstract void close() throws IOException
      Drops all connections and close the SubData Listener
      Throws:
      IOException
    • waitFor

      public void waitFor() throws InterruptedException
      Wait for the listener to close
      Throws:
      InterruptedException
    • isClosed

      public abstract boolean isClosed()
      Get if the listener has been closed
      Returns:
      Closed Status