Class MatchmakingTicket
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<MatchmakingTicket.Builder,
MatchmakingTicket>
Ticket generated to track the progress of a matchmaking request. Each ticket is uniquely identified by a ticket ID, supplied by the requester, when creating a matchmaking request.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MatchmakingTicket.Builder
builder()
final String
The Amazon Resource Name (ARN) associated with the GameLift matchmaking configuration resource that is used with this ticket.final String
Name of the matchmaking configuration that is used with this ticket.final Instant
endTime()
Time stamp indicating when the matchmaking request stopped being processed due to successful completion, timeout, or cancellation.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final Integer
Average amount of time (in seconds) that players are currently waiting for a match.Connection information for a new game session.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the Players property.players()
A set ofPlayer
objects, each representing a player to find matches for.static Class
<? extends MatchmakingTicket.Builder> final Instant
Time stamp indicating when this matchmaking request was received.status()
Current status of the matchmaking request.final String
Current status of the matchmaking request.final String
Additional information about the current status.final String
Code to explain the current status.final String
ticketId()
A unique identifier for a matchmaking ticket.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
ticketId
A unique identifier for a matchmaking ticket.
- Returns:
- A unique identifier for a matchmaking ticket.
-
configurationName
Name of the matchmaking configuration that is used with this ticket. Matchmaking configurations determine how players are grouped into a match and how a new game session is created for the match.
- Returns:
- Name of the matchmaking configuration that is used with this ticket. Matchmaking configurations determine how players are grouped into a match and how a new game session is created for the match.
-
configurationArn
The Amazon Resource Name (ARN) associated with the GameLift matchmaking configuration resource that is used with this ticket.
- Returns:
- The Amazon Resource Name (ARN) associated with the GameLift matchmaking configuration resource that is used with this ticket.
-
status
Current status of the matchmaking request.
-
QUEUED -- The matchmaking request has been received and is currently waiting to be processed.
-
SEARCHING -- The matchmaking request is currently being processed.
-
REQUIRES_ACCEPTANCE -- A match has been proposed and the players must accept the match. This status is used only with requests that use a matchmaking configuration with a player acceptance requirement.
-
PLACING -- The FlexMatch engine has matched players and is in the process of placing a new game session for the match.
-
COMPLETED -- Players have been matched and a game session is ready to host the players. A ticket in this state contains the necessary connection information for players.
-
FAILED -- The matchmaking request was not completed.
-
CANCELLED -- The matchmaking request was canceled. This may be the result of a
StopMatchmaking
operation or a proposed match that one or more players failed to accept. -
TIMED_OUT -- The matchmaking request was not successful within the duration specified in the matchmaking configuration.
Matchmaking requests that fail to successfully complete (statuses FAILED, CANCELLED, TIMED_OUT) can be resubmitted as new requests with new ticket IDs.
If the service returns an enum value that is not available in the current SDK version,
status
will returnMatchmakingConfigurationStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstatusAsString()
.- Returns:
- Current status of the matchmaking request.
-
QUEUED -- The matchmaking request has been received and is currently waiting to be processed.
-
SEARCHING -- The matchmaking request is currently being processed.
-
REQUIRES_ACCEPTANCE -- A match has been proposed and the players must accept the match. This status is used only with requests that use a matchmaking configuration with a player acceptance requirement.
-
PLACING -- The FlexMatch engine has matched players and is in the process of placing a new game session for the match.
-
COMPLETED -- Players have been matched and a game session is ready to host the players. A ticket in this state contains the necessary connection information for players.
-
FAILED -- The matchmaking request was not completed.
-
CANCELLED -- The matchmaking request was canceled. This may be the result of a
StopMatchmaking
operation or a proposed match that one or more players failed to accept. -
TIMED_OUT -- The matchmaking request was not successful within the duration specified in the matchmaking configuration.
Matchmaking requests that fail to successfully complete (statuses FAILED, CANCELLED, TIMED_OUT) can be resubmitted as new requests with new ticket IDs.
-
- See Also:
-
-
statusAsString
Current status of the matchmaking request.
-
QUEUED -- The matchmaking request has been received and is currently waiting to be processed.
-
SEARCHING -- The matchmaking request is currently being processed.
-
REQUIRES_ACCEPTANCE -- A match has been proposed and the players must accept the match. This status is used only with requests that use a matchmaking configuration with a player acceptance requirement.
-
PLACING -- The FlexMatch engine has matched players and is in the process of placing a new game session for the match.
-
COMPLETED -- Players have been matched and a game session is ready to host the players. A ticket in this state contains the necessary connection information for players.
-
FAILED -- The matchmaking request was not completed.
-
CANCELLED -- The matchmaking request was canceled. This may be the result of a
StopMatchmaking
operation or a proposed match that one or more players failed to accept. -
TIMED_OUT -- The matchmaking request was not successful within the duration specified in the matchmaking configuration.
Matchmaking requests that fail to successfully complete (statuses FAILED, CANCELLED, TIMED_OUT) can be resubmitted as new requests with new ticket IDs.
If the service returns an enum value that is not available in the current SDK version,
status
will returnMatchmakingConfigurationStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstatusAsString()
.- Returns:
- Current status of the matchmaking request.
-
QUEUED -- The matchmaking request has been received and is currently waiting to be processed.
-
SEARCHING -- The matchmaking request is currently being processed.
-
REQUIRES_ACCEPTANCE -- A match has been proposed and the players must accept the match. This status is used only with requests that use a matchmaking configuration with a player acceptance requirement.
-
PLACING -- The FlexMatch engine has matched players and is in the process of placing a new game session for the match.
-
COMPLETED -- Players have been matched and a game session is ready to host the players. A ticket in this state contains the necessary connection information for players.
-
FAILED -- The matchmaking request was not completed.
-
CANCELLED -- The matchmaking request was canceled. This may be the result of a
StopMatchmaking
operation or a proposed match that one or more players failed to accept. -
TIMED_OUT -- The matchmaking request was not successful within the duration specified in the matchmaking configuration.
Matchmaking requests that fail to successfully complete (statuses FAILED, CANCELLED, TIMED_OUT) can be resubmitted as new requests with new ticket IDs.
-
- See Also:
-
-
statusReason
Code to explain the current status. For example, a status reason may indicate when a ticket has returned to
SEARCHING
status after a proposed match fails to receive player acceptances.- Returns:
- Code to explain the current status. For example, a status reason may indicate when a ticket has returned
to
SEARCHING
status after a proposed match fails to receive player acceptances.
-
statusMessage
Additional information about the current status.
- Returns:
- Additional information about the current status.
-
startTime
Time stamp indicating when this matchmaking request was received. Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
).- Returns:
- Time stamp indicating when this matchmaking request was received. Format is a number expressed in Unix
time as milliseconds (for example
"1469498468.057"
).
-
endTime
Time stamp indicating when the matchmaking request stopped being processed due to successful completion, timeout, or cancellation. Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
).- Returns:
- Time stamp indicating when the matchmaking request stopped being processed due to successful completion,
timeout, or cancellation. Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
).
-
hasPlayers
public final boolean hasPlayers()For responses, this returns true if the service returned a value for the Players property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
players
A set of
Player
objects, each representing a player to find matches for. Players are identified by a unique player ID and may include latency data for use during matchmaking. If the ticket is in statusCOMPLETED
, thePlayer
objects include the team the players were assigned to in the resulting match.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasPlayers()
method.- Returns:
- A set of
Player
objects, each representing a player to find matches for. Players are identified by a unique player ID and may include latency data for use during matchmaking. If the ticket is in statusCOMPLETED
, thePlayer
objects include the team the players were assigned to in the resulting match.
-
gameSessionConnectionInfo
Connection information for a new game session. Once a match is made, the FlexMatch engine creates a new game session for it. This information is added to the matchmaking ticket, which you can be retrieve by calling DescribeMatchmaking .
- Returns:
- Connection information for a new game session. Once a match is made, the FlexMatch engine creates a new game session for it. This information is added to the matchmaking ticket, which you can be retrieve by calling DescribeMatchmaking .
-
estimatedWaitTime
Average amount of time (in seconds) that players are currently waiting for a match. If there is not enough recent data, this property may be empty.
- Returns:
- Average amount of time (in seconds) that players are currently waiting for a match. If there is not enough recent data, this property may be empty.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<MatchmakingTicket.Builder,
MatchmakingTicket> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-