Class WebEditorSocket

java.lang.Object
me.lucko.luckperms.common.webeditor.socket.WebEditorSocket

public class WebEditorSocket extends Object
  • Constructor Details

  • Method Details

    • initialize

      public void initialize(BytesocksClient client) throws UnsuccessfulRequestException, IOException
      Initializes the socket connection.
      Parameters:
      client - the bytesocks client to connect to
      Throws:
      UnsuccessfulRequestException - if the request fails
      IOException - if an i/o error occurs
    • waitForConnect

      public void waitForConnect(long timeout, TimeUnit unit)
      Waits the specified amount of time for the socket to connect, before throwing an exception if a timeout occurs.
      Parameters:
      timeout - the timeout
      unit - the timeout unit
    • appendDetailToRequest

      public void appendDetailToRequest(WebEditorRequest request)
      Adds detail about the socket channel and the plugin public key to the editor request payload that gets sent via bytebin to the viewer.
      Parameters:
      request - the request
    • send

      public void send(com.google.gson.JsonObject msg)
      Send a message to the socket.

      The message will be encoded as JSON and signed using the public public key.

      Parameters:
      msg - the message
    • trustConnection

      public boolean trustConnection(String nonce)
    • scheduleCleanupIfUnused

      public void scheduleCleanupIfUnused()
    • close

      public void close()
    • getPlugin

      public LuckPermsPlugin getPlugin()
    • getSender

      public Sender getSender()
    • getSession

      public WebEditorSession getSession()
    • getSocket

      public BytesocksClient.Socket getSocket()
    • getRemotePublicKey

      public PublicKey getRemotePublicKey()
    • setRemotePublicKey

      public void setRemotePublicKey(PublicKey remotePublicKey)
    • isClosed

      public boolean isClosed()