Class DataClient

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

public abstract class DataClient extends Object
SubData Client API Class
  • Field Details

  • Constructor Details

    • DataClient

      public DataClient()
  • Method Details

    • ping

      public abstract void ping(Consumer<PingResponse> response)
      Ping the Client
      Parameters:
      response - Ping Response
    • sendMessage

      public abstract void sendMessage(MessageOut... messages)
      Send a message to the Client
      Parameters:
      messages - Messages to send
    • getBlockSize

      public abstract int getBlockSize()
      Get SubData's default Block Size
      Returns:
      Block Size
    • tempBlockSize

      public abstract void tempBlockSize(Integer size)
      Set SubData's Block Size for the current message
      Parameters:
      size - Block Size (null for default)
    • getServer

      public abstract DataServer getServer()
      Get the Server this Client belongs to
      Returns:
      SubData Server
    • getID

      public UUID getID()
      Get the ID of this Client
      Returns:
      Client ID
    • getAddress

      public abstract InetSocketAddress getAddress()
      Get Remote Address
      Returns:
      Address
    • getAuthResponse

      public abstract Object getAuthResponse()
      Gets the response from the Authorization Service
      Returns:
      Authorization Service Response
    • getHandler

      public abstract ClientHandler getHandler()
      Gets the Linked Handler
      Returns:
      Handler
    • newChannel

      public abstract void newChannel(Consumer<DataClient> client)
      Open an Async Data SubChannel
    • close

      public abstract void close() throws IOException
      Closes the connection
      Throws:
      IOException
    • waitFor

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

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