Interface EngineConnection

All Superinterfaces:
RemoteConnection
All Known Subinterfaces:
ClientSideConnection, ServerSideConnection

public interface EngineConnection extends RemoteConnection
Represents a connection on the server or client engine.
  • Method Details

    • side

      Gets the side this connection is on.
      Returns:
      The side
    • state

      Gets the state this connection is on.
      Returns:
      The state, or Optional.empty() if the connection has been closed.
    • close

      void close()
      Closes the connection, showing the default disconnect reason. (the translation key disconnect.disconnected)
      Specified by:
      close in interface RemoteConnection
    • close

      void close(Component reason)
      Closes the connection with the given reason.
      Parameters:
      reason - The reason for the disconnection