Class DisableRangeBroadcast

java.lang.Object
com.iohao.net.extension.room.DisableRangeBroadcast
All Implemented Interfaces:
RangeBroadcast

public final class DisableRangeBroadcast extends Object implements RangeBroadcast
No-op RangeBroadcast implementation used to disable range broadcasting.
Since:
25.1
Author:
渔民小镇
date:
2025-09-28
  • Method Details

    • listUserId

      public Set<Long> listUserId()
      Description copied from interface: RangeBroadcast
      Return the mutable set of user IDs that will receive this broadcast.
      Specified by:
      listUserId in interface RangeBroadcast
      Returns:
      mutable set of target user IDs
    • setData

      public RangeBroadcast setData(byte[] data)
      Description copied from interface: RangeBroadcast
      Set the raw byte-array payload for this broadcast.
      Specified by:
      setData in interface RangeBroadcast
      Parameters:
      data - encoded payload bytes
      Returns:
      this instance for chaining
    • setOriginal

      public void setOriginal(Object originalData)
      Description copied from interface: RangeBroadcast
      Store the original (pre-encoding) data object for inspection or debugging.
      Specified by:
      setOriginal in interface RangeBroadcast
      Parameters:
      originalData - the original business data before encoding
    • execute

      public void execute()
      Description copied from interface: RangeBroadcast
      Send the response message to the remote endpoint (user, player)
      Specified by:
      execute in interface RangeBroadcast
    • addUserId

      public RangeBroadcast addUserId(Collection<Long> userIds)
      Description copied from interface: RangeBroadcast
      Users receiving the broadcast
      Specified by:
      addUserId in interface RangeBroadcast
      Parameters:
      userIds - userIds
      Returns:
      this
    • addUserId

      public RangeBroadcast addUserId(long userId)
      Description copied from interface: RangeBroadcast
      Users receiving the broadcast
      Specified by:
      addUserId in interface RangeBroadcast
      Parameters:
      userId - userId
      Returns:
      this
    • addUserId

      public RangeBroadcast addUserId(Collection<Long> userIds, long excludeUserId)
      Description copied from interface: RangeBroadcast
      Add users to receive the broadcast, simultaneously excluding one user who should not receive it
      Specified by:
      addUserId in interface RangeBroadcast
      Parameters:
      userIds - User IDs to receive the broadcast
      excludeUserId - User ID to be excluded
      Returns:
      this
    • removeUserId

      public RangeBroadcast removeUserId(long excludeUserId)
      Description copied from interface: RangeBroadcast
      Exclude userId
      Specified by:
      removeUserId in interface RangeBroadcast
      Parameters:
      excludeUserId - User ID to be excluded
      Returns:
      this
    • setData

      public RangeBroadcast setData(int data)
      Description copied from interface: RangeBroadcast
      Set the broadcast payload from an int value, encoding it via the configured codec.
      Specified by:
      setData in interface RangeBroadcast
      Parameters:
      data - the integer value to broadcast
      Returns:
      this instance for chaining
    • setData

      public RangeBroadcast setData(boolean data)
      Description copied from interface: RangeBroadcast
      Set the broadcast payload from a boolean value, encoding it via the configured codec.
      Specified by:
      setData in interface RangeBroadcast
      Parameters:
      data - the boolean value to broadcast
      Returns:
      this instance for chaining
    • setData

      public RangeBroadcast setData(long data)
      Description copied from interface: RangeBroadcast
      Set the broadcast payload from a long value, encoding it via the configured codec.
      Specified by:
      setData in interface RangeBroadcast
      Parameters:
      data - the long value to broadcast
      Returns:
      this instance for chaining
    • setData

      public RangeBroadcast setData(String data)
      Description copied from interface: RangeBroadcast
      Set the broadcast payload from a String value, encoding it via the configured codec.
      Specified by:
      setData in interface RangeBroadcast
      Parameters:
      data - the string value to broadcast (must not be null)
      Returns:
      this instance for chaining
    • setData

      public RangeBroadcast setData(Object data)
      Description copied from interface: RangeBroadcast
      Set the broadcast payload from a business object, encoding it via the configured codec.
      Specified by:
      setData in interface RangeBroadcast
      Parameters:
      data - the business data object to broadcast (must not be null)
      Returns:
      this instance for chaining
    • setData

      public RangeBroadcast setData(Collection<?> dataList)
      Description copied from interface: RangeBroadcast
      Set the broadcast payload from a collection of business objects, encoding it via the configured codec.
      Specified by:
      setData in interface RangeBroadcast
      Parameters:
      dataList - the collection of objects to broadcast
      Returns:
      this instance for chaining
    • setDataListInt

      public RangeBroadcast setDataListInt(List<Integer> dataList)
      Description copied from interface: RangeBroadcast
      Set the broadcast payload from a list of Integer values, encoding it via the configured codec.
      Specified by:
      setDataListInt in interface RangeBroadcast
      Parameters:
      dataList - the list of integer values to broadcast
      Returns:
      this instance for chaining
    • setDataListBool

      public RangeBroadcast setDataListBool(List<Boolean> dataList)
      Description copied from interface: RangeBroadcast
      Set the broadcast payload from a list of Boolean values, encoding it via the configured codec.
      Specified by:
      setDataListBool in interface RangeBroadcast
      Parameters:
      dataList - the list of boolean values to broadcast
      Returns:
      this instance for chaining
    • setDataListLong

      public RangeBroadcast setDataListLong(List<Long> dataList)
      Description copied from interface: RangeBroadcast
      Set the broadcast payload from a list of Long values, encoding it via the configured codec.
      Specified by:
      setDataListLong in interface RangeBroadcast
      Parameters:
      dataList - the list of long values to broadcast
      Returns:
      this instance for chaining
    • setDataListString

      public RangeBroadcast setDataListString(List<String> dataList)
      Description copied from interface: RangeBroadcast
      Set the broadcast payload from a list of String values, encoding it via the configured codec.
      Specified by:
      setDataListString in interface RangeBroadcast
      Parameters:
      dataList - the list of string values to broadcast
      Returns:
      this instance for chaining
    • me

      public static DisableRangeBroadcast me()