Class BindingLogicServerMessage.Builder
java.lang.Object
com.iohao.net.framework.protocol.BindingLogicServerMessage.Builder
- Enclosing class:
BindingLogicServerMessage
Fluent builder for constructing
BindingLogicServerMessage instances.
At least one user id must be added before calling build().
- Since:
- 25.1
- Author:
- 渔民小镇
-
Method Summary
Modifier and TypeMethodDescriptionaddLogicServerId(int logicServerId) Add a single logic server id.addLogicServerId(int[] logicServerIds) Add multiple logic server ids from an array.addLogicServerId(Collection<Integer> logicServerIds) Add multiple logic server ids from a collection.addUserId(long userId) Add a single user id.addUserId(long[] userIds) Add multiple user ids from an array.addUserId(Collection<Long> userIds) Add multiple user ids from a collection.build()Build theBindingLogicServerMessage.setExternalServerId(int externalServerId)
-
Method Details
-
build
Build theBindingLogicServerMessage.- Returns:
- a new message instance
- Throws:
IllegalArgumentException- if no user ids have been added
-
addUserId
Add a single user id.- Parameters:
userId- the user id- Returns:
- this builder
-
addUserId
Add multiple user ids from a collection.- Parameters:
userIds- the user ids to add- Returns:
- this builder
-
addUserId
Add multiple user ids from an array.- Parameters:
userIds- the user ids to add- Returns:
- this builder
-
addLogicServerId
Add a single logic server id.- Parameters:
logicServerId- the logic server id- Returns:
- this builder
-
addLogicServerId
Add multiple logic server ids from a collection.- Parameters:
logicServerIds- the logic server ids to add- Returns:
- this builder
-
addLogicServerId
Add multiple logic server ids from an array.- Parameters:
logicServerIds- the logic server ids to add- Returns:
- this builder
-
setExternalServerId
- Returns:
this.
-