Interface BridgeMessage

All Known Implementing Classes:
BridgeMessage.ConnectRequest, BridgeMessage.Health, BridgeMessage.PartyWarp, BridgeMessage.QueueJoin, BridgeMessage.QueueLeave, BridgeMessage.QueueStatusResponse, BridgeMessage.RequestStatus, BridgeMessage.WorldLoaded, BridgeMessage.WorldPreload, BridgeMessage.WorldUnloaded

Base interface for all btc:bridge messages.

Messages are serialized as JSON with a "type" discriminator field. The sealed-interface hierarchy below enumerates every message exchanged between the proxy and its backend servers over the btc:bridge plugin messaging channel. Each record is immutable and safe to share across threads.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Backend -> Proxy: move a single player (identified by UUID) to another backend server.
    static final record 
    Backend -> Proxy: a periodic health report from a backend server.
    static final record 
    Backend -> Proxy: move a group of players (for example a whole party) to a destination server in a single request.
    static final record 
    Proxy -> Backend: a player joined the queue for a server.
    static final record 
    Proxy -> Backend: a player left the queue.
    static final record 
    Backend -> Proxy: a response to a queue-status query, reporting the backend's own queue depth.
    static final record 
    Proxy -> Backend: request that the backend report its current health status.
    static final record 
    Backend -> Proxy: a world has been loaded and is ready to accept players.
    static final record 
    Proxy -> Backend: a player is about to be transferred, preload the given world.
    static final record 
    Backend -> Proxy: a world has been unloaded.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the string discriminator used to route this message during (de)serialization.
  • Method Details

    • type

      String type()
      Returns the string discriminator used to route this message during (de)serialization.
      Returns:
      the message type identifier