Class DisconnectedEvent
java.lang.Object
dev.robocode.tankroyale.botapi.events.DisconnectedEvent
-
Constructor Summary
ConstructorDescriptionDisconnectedEvent
(URI serverUri, boolean remote, Integer statusCode, String reason) Initializes a new instance of the DisconnectedEvent class. -
Method Summary
Modifier and TypeMethodDescriptionReturns a message with the reason for closing the connection, if such reason exists.Return the URI of the server.Returns a status code that indicates the reason for closing the connection, if such status code exists.boolean
isRemote()
Checks if closing the connection was initiated by the remote host.
-
Constructor Details
-
DisconnectedEvent
Initializes a new instance of the DisconnectedEvent class.- Parameters:
serverUri
- is the URI of the server.remote
- is a flag indicating if closing of the connection was initiated by the remote host.statusCode
- is a status code that indicates the reason for closing the connection.reason
- is a message with the reason for closing the connection.
-
-
Method Details
-
isRemote
public boolean isRemote()Checks if closing the connection was initiated by the remote host.- Returns:
true
if closing the connection was initiated by the remote host;false
otherwise.
-
getStatusCode
-
getReason
-
getServerUri
-