Package in.dragonbra.javasteam.handlers
Class ClientMsgHandler
- java.lang.Object
-
- in.dragonbra.javasteam.handlers.ClientMsgHandler
-
- Direct Known Subclasses:
SteamApps,SteamCloud,SteamFriends,SteamGameCoordinator,SteamGameServer,SteamMasterServer,SteamNotifications,SteamScreenshots,SteamTrading,SteamUnifiedMessages,SteamUser,SteamUserStats,SteamWorkshop
public abstract class ClientMsgHandler extends java.lang.ObjectThis class implements the base requirements every message handler should inherit from.
-
-
Field Summary
Fields Modifier and Type Field Description protected SteamClientclient
-
Constructor Summary
Constructors Constructor Description ClientMsgHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description SteamClientgetClient()abstract voidhandleMsg(IPacketMsg packetMsg)Handles a client message.protected booleanisExpectDisconnection()Gets whether or not the relatedSteamClientshould imminently expect the server to close the connection.protected voidsetExpectDisconnection(boolean expectDisconnection)Sets whether or not the relatedSteamClientshould imminently expect the server to close the connection.voidsetup(SteamClient client)
-
-
-
Field Detail
-
client
protected SteamClient client
-
-
Method Detail
-
setup
public void setup(SteamClient client)
-
isExpectDisconnection
protected boolean isExpectDisconnection()
Gets whether or not the relatedSteamClientshould imminently expect the server to close the connection. If this is true when the connection is closed, theDisconnectedCallback'sDisconnectedCallback.isUserInitiated()property will be set to true.- Returns:
- whether or not the related
SteamClientshould imminently expect the server to close the connection.
-
setExpectDisconnection
protected void setExpectDisconnection(boolean expectDisconnection)
Sets whether or not the relatedSteamClientshould imminently expect the server to close the connection. If this is true when the connection is closed, theDisconnectedCallback'sDisconnectedCallback.isUserInitiated()property will be set to true.- Parameters:
expectDisconnection- whether or not the relatedSteamClientshould imminently expect the server to close the connection.
-
getClient
public SteamClient getClient()
- Returns:
- the underlying
SteamClientfor use in sending replies.
-
handleMsg
public abstract void handleMsg(IPacketMsg packetMsg)
Handles a client message. This should not be called directly.- Parameters:
packetMsg- The packet message that contains the data.
-
-