Class DisableRangeBroadcast
java.lang.Object
com.iohao.net.extension.room.DisableRangeBroadcast
- All Implemented Interfaces:
RangeBroadcast
No-op
RangeBroadcast implementation used to disable range broadcasting.- Since:
- 25.1
- Author:
- 渔民小镇
- date:
- 2025-09-28
-
Method Summary
Modifier and TypeMethodDescriptionaddUserId(long userId) Users receiving the broadcastaddUserId(Collection<Long> userIds) Users receiving the broadcastaddUserId(Collection<Long> userIds, long excludeUserId) Add users to receive the broadcast, simultaneously excluding one user who should not receive itvoidexecute()Send the response message to the remote endpoint (user, player)Return the mutable set of user IDs that will receive this broadcast.static DisableRangeBroadcastme()removeUserId(long excludeUserId) Exclude userIdsetData(boolean data) Set the broadcast payload from abooleanvalue, encoding it via the configured codec.setData(byte[] data) Set the raw byte-array payload for this broadcast.setData(int data) Set the broadcast payload from anintvalue, encoding it via the configured codec.setData(long data) Set the broadcast payload from alongvalue, encoding it via the configured codec.Set the broadcast payload from a business object, encoding it via the configured codec.Set the broadcast payload from aStringvalue, encoding it via the configured codec.setData(Collection<?> dataList) Set the broadcast payload from a collection of business objects, encoding it via the configured codec.setDataListBool(List<Boolean> dataList) Set the broadcast payload from a list ofBooleanvalues, encoding it via the configured codec.setDataListInt(List<Integer> dataList) Set the broadcast payload from a list ofIntegervalues, encoding it via the configured codec.setDataListLong(List<Long> dataList) Set the broadcast payload from a list ofLongvalues, encoding it via the configured codec.setDataListString(List<String> dataList) Set the broadcast payload from a list ofStringvalues, encoding it via the configured codec.voidsetOriginal(Object originalData) Store the original (pre-encoding) data object for inspection or debugging.
-
Method Details
-
listUserId
Description copied from interface:RangeBroadcastReturn the mutable set of user IDs that will receive this broadcast.- Specified by:
listUserIdin interfaceRangeBroadcast- Returns:
- mutable set of target user IDs
-
setData
Description copied from interface:RangeBroadcastSet the raw byte-array payload for this broadcast.- Specified by:
setDatain interfaceRangeBroadcast- Parameters:
data- encoded payload bytes- Returns:
- this instance for chaining
-
setOriginal
Description copied from interface:RangeBroadcastStore the original (pre-encoding) data object for inspection or debugging.- Specified by:
setOriginalin interfaceRangeBroadcast- Parameters:
originalData- the original business data before encoding
-
execute
public void execute()Description copied from interface:RangeBroadcastSend the response message to the remote endpoint (user, player)- Specified by:
executein interfaceRangeBroadcast
-
addUserId
Description copied from interface:RangeBroadcastUsers receiving the broadcast- Specified by:
addUserIdin interfaceRangeBroadcast- Parameters:
userIds- userIds- Returns:
- this
-
addUserId
Description copied from interface:RangeBroadcastUsers receiving the broadcast- Specified by:
addUserIdin interfaceRangeBroadcast- Parameters:
userId- userId- Returns:
- this
-
addUserId
Description copied from interface:RangeBroadcastAdd users to receive the broadcast, simultaneously excluding one user who should not receive it- Specified by:
addUserIdin interfaceRangeBroadcast- Parameters:
userIds- User IDs to receive the broadcastexcludeUserId- User ID to be excluded- Returns:
- this
-
removeUserId
Description copied from interface:RangeBroadcastExclude userId- Specified by:
removeUserIdin interfaceRangeBroadcast- Parameters:
excludeUserId- User ID to be excluded- Returns:
- this
-
setData
Description copied from interface:RangeBroadcastSet the broadcast payload from anintvalue, encoding it via the configured codec.- Specified by:
setDatain interfaceRangeBroadcast- Parameters:
data- the integer value to broadcast- Returns:
- this instance for chaining
-
setData
Description copied from interface:RangeBroadcastSet the broadcast payload from abooleanvalue, encoding it via the configured codec.- Specified by:
setDatain interfaceRangeBroadcast- Parameters:
data- the boolean value to broadcast- Returns:
- this instance for chaining
-
setData
Description copied from interface:RangeBroadcastSet the broadcast payload from alongvalue, encoding it via the configured codec.- Specified by:
setDatain interfaceRangeBroadcast- Parameters:
data- the long value to broadcast- Returns:
- this instance for chaining
-
setData
Description copied from interface:RangeBroadcastSet the broadcast payload from aStringvalue, encoding it via the configured codec.- Specified by:
setDatain interfaceRangeBroadcast- Parameters:
data- the string value to broadcast (must not be null)- Returns:
- this instance for chaining
-
setData
Description copied from interface:RangeBroadcastSet the broadcast payload from a business object, encoding it via the configured codec.- Specified by:
setDatain interfaceRangeBroadcast- Parameters:
data- the business data object to broadcast (must not be null)- Returns:
- this instance for chaining
-
setData
Description copied from interface:RangeBroadcastSet the broadcast payload from a collection of business objects, encoding it via the configured codec.- Specified by:
setDatain interfaceRangeBroadcast- Parameters:
dataList- the collection of objects to broadcast- Returns:
- this instance for chaining
-
setDataListInt
Description copied from interface:RangeBroadcastSet the broadcast payload from a list ofIntegervalues, encoding it via the configured codec.- Specified by:
setDataListIntin interfaceRangeBroadcast- Parameters:
dataList- the list of integer values to broadcast- Returns:
- this instance for chaining
-
setDataListBool
Description copied from interface:RangeBroadcastSet the broadcast payload from a list ofBooleanvalues, encoding it via the configured codec.- Specified by:
setDataListBoolin interfaceRangeBroadcast- Parameters:
dataList- the list of boolean values to broadcast- Returns:
- this instance for chaining
-
setDataListLong
Description copied from interface:RangeBroadcastSet the broadcast payload from a list ofLongvalues, encoding it via the configured codec.- Specified by:
setDataListLongin interfaceRangeBroadcast- Parameters:
dataList- the list of long values to broadcast- Returns:
- this instance for chaining
-
setDataListString
Description copied from interface:RangeBroadcastSet the broadcast payload from a list ofStringvalues, encoding it via the configured codec.- Specified by:
setDataListStringin interfaceRangeBroadcast- Parameters:
dataList- the list of string values to broadcast- Returns:
- this instance for chaining
-
me
-