Class ConnectResponseMessage
java.lang.Object
com.iohao.net.framework.protocol.ServerMessage
com.iohao.net.framework.protocol.ConnectResponseMessage
Response message sent when a server successfully connects (joins) the cluster.
Created from a ServerMessage via the of(ServerMessage) factory
method, copying all server metadata and adding the joining server's id and
a future correlation id.
- Since:
- 25.1
- Author:
- 渔民小镇
- date:
- 2025-09-25
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongCorrelation id used to match this response to its originating connect request.intIdentifier of the server that has joined the cluster.static ConnectResponseMessageof(ServerMessage message) Create aConnectResponseMessageby copying metadata from the given server message.voidsetFutureId(long futureId) Correlation id used to match this response to its originating connect request.voidsetJoinServerId(int joinServerId) Identifier of the server that has joined the cluster.toString()Methods inherited from class ServerMessage
addPayload, getCmdMerges, getId, getIp, getName, getNetId, getPayload, getPayloadMap, getPubName, getServerType, getTag, setCmdMerges, setId, setIp, setName, setNetId, setPubName, setServerType, setTag
-
Constructor Details
-
ConnectResponseMessage
public ConnectResponseMessage()
-
-
Method Details
-
of
Create aConnectResponseMessageby copying metadata from the given server message.- Parameters:
message- the source server message whose metadata is copied- Returns:
- a new
ConnectResponseMessagepopulated with the source metadata
-
getFutureId
public long getFutureId()Correlation id used to match this response to its originating connect request. -
getJoinServerId
public int getJoinServerId()Identifier of the server that has joined the cluster. -
setFutureId
public void setFutureId(long futureId) Correlation id used to match this response to its originating connect request. -
setJoinServerId
public void setJoinServerId(int joinServerId) Identifier of the server that has joined the cluster. -
toString
- Overrides:
toStringin classServerMessage
-