game / pragma.matchlifecycle / MatchLifecycleService /
MatchLifecycleService #
internal class MatchLifecycleService(pragmaNode: PragmaNode, instanceId: UUID, routingUtils: RoutingUtils = RoutingUtils.defaultInstance, matchEndMetrics: MatchEndMetrics = MatchEndMetrics(
Metrics(pragmaNode.metricsRegistry),
LoggerFactory.getLogger(MatchEndMetrics::class.java)
), matchEndCommand: MatchEndCommand = MatchEndCommand(), matchesInProcess: MatchesInProcess = MatchesInProcess(), sessionClient: SessionClient = SessionClient(), matchmakingClient: MatchmakingClient = MatchmakingClient(), matchCapacityClient: MatchCapacityClient = MatchCapacityClient(), partyClient: PartyClient = PartyClient()) : DistributedService, ConfigHandler<MatchLifecycleServiceConfig>
MatchLifecycle service is a game loop service responsible for creating matches, sending match connection details to players, and handling any match end processing.
Constructors #
MatchLifecycleService | fun MatchLifecycleService(pragmaNode: PragmaNode, instanceId: UUID, routingUtils: RoutingUtils = RoutingUtils.defaultInstance, matchEndMetrics: MatchEndMetrics = MatchEndMetrics(
Metrics(pragmaNode.metricsRegistry),
LoggerFactory.getLogger(MatchEndMetrics::class.java)
), matchEndCommand: MatchEndCommand = MatchEndCommand(), matchesInProcess: MatchesInProcess = MatchesInProcess(), sessionClient: SessionClient = SessionClient(), matchmakingClient: MatchmakingClient = MatchmakingClient(), matchCapacityClient: MatchCapacityClient = MatchCapacityClient(), partyClient: PartyClient = PartyClient()) |
Functions #
Name | Summary |
---|---|
Called by a game server to confirm the connection details and match ext data for the found players. | |
Create a new match and find a game server for the match run on. | |
Prevent the player from reconnecting to the match. Match reconnect must be configured to OPTIONAL. A notification with the match ID and player ID will be sent to the game server running the match. | |
Allows a match to reenter matchmaking to find and add more players. This endpoint will call the Matchmaking Service to add the match to the requested queue as an Active Match. | |
Called by the MatchmakingService when an Active Match has found some additional players to add from the queue. | |
Request made by the Game Server to remove a Match from matchmaking. The MatchmakingService may complete any pending changes to the match before it is removed. | |
Signals a match has failed to start. Invoked by the MatchCapacityService. | |
Provides the current match details for a player. | |
Signals a match has completed. Invoked by the game server. | |
Invoked by the game server to indicate that a match is still operating normally. | |
Signals a match is ready to join. Invoked by the game server. | |
Notification handler for player disconnect. Marks player as REMOVED from match. | |
Notification handler for player reconnect. Attempt to reconnect them to their match, if they were in one. | |
Processes a match end for a subset of players within a match. Does not end the match. | |
Update the status of a Match to reflect that it is no longer in matchmaking. Silently continues if match is no longer tracked. | |
Called by the game server to verify that connecting players are not misrepresenting their pragma identity. |