Class SubDataClient

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

public class SubDataClient extends DataClient
SubData Client Class
  • Method Details

    • sendPacket

      public void sendPacket(PacketOut... packets)
      Send a packet to the Client
      Parameters:
      packets - Packets to send
    • sendMessage

      public void sendMessage(MessageOut... messages)
      Description copied from class: DataClient
      Send a message to the Client
      Specified by:
      sendMessage in class DataClient
      Parameters:
      messages - Messages to send
    • ping

      public void ping(Consumer<PingResponse> response)
      Description copied from class: DataClient
      Ping the Client
      Specified by:
      ping in class DataClient
      Parameters:
      response - Ping Response
    • getSocket

      public Socket getSocket()
      Get the underlying Client Socket
      Returns:
      Client Socket
    • getServer

      public SubDataServer getServer()
      Get the Server this Client belongs to
      Specified by:
      getServer in class DataClient
      Returns:
      SubData Server
    • getAddress

      public InetSocketAddress getAddress()
      Description copied from class: DataClient
      Get Remote Address
      Specified by:
      getAddress in class DataClient
      Returns:
      Address
    • getBlockSize

      public int getBlockSize()
      Get SubData's Block Size
      Specified by:
      getBlockSize in class DataClient
      Returns:
      Block Size
    • setBlockSize

      public void setBlockSize(Integer size)
      Set SubData's Block Size
      Parameters:
      size - Block Size (null for super)
    • tempBlockSize

      public void tempBlockSize(Integer size)
      Set SubData's Block Size for the current packet
      Specified by:
      tempBlockSize in class DataClient
      Parameters:
      size - Block Size (null for default)
    • getAuthResponse

      public Object getAuthResponse()
      Description copied from class: DataClient
      Gets the response from the Authorization Service
      Specified by:
      getAuthResponse in class DataClient
      Returns:
      Authorization Service Response
    • getHandler

      public ClientHandler getHandler()
      Description copied from class: DataClient
      Gets the Linked Handler
      Specified by:
      getHandler in class DataClient
      Returns:
      Handler
    • setHandler

      public void setHandler(ClientHandler obj)
      Sets the Handler (should only be called by Handlers themselves)
      Parameters:
      obj - Handler
      See Also:
    • newChannel

      @Deprecated public void newChannel(Consumer<DataClient> client)
      Deprecated.
      Description copied from class: DataClient
      Open an Async Data SubChannel
      Specified by:
      newChannel in class DataClient
    • openChannel

      public void openChannel(Consumer<SubDataClient> client)
      Open an Async Data SubChannel
    • reconnect

      public void reconnect(SubDataClient client)
      Reconnect the data stream using another Client
      Parameters:
      client - Client
    • close

      public void close()
      Description copied from class: DataClient
      Closes the connection
      Specified by:
      close in class DataClient
    • isClosed

      public boolean isClosed()
      Description copied from class: DataClient
      Get if the connection has been closed
      Specified by:
      isClosed in class DataClient
      Returns:
      Closed Status