Class MatchmakingTicket
- java.lang.Object
-
- software.amazon.awssdk.services.gamelift.model.MatchmakingTicket
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<MatchmakingTicket.Builder,MatchmakingTicket>
@Generated("software.amazon.awssdk:codegen") public final class MatchmakingTicket extends Object implements SdkPojo, Serializable, 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMatchmakingTicket.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MatchmakingTicket.Builderbuilder()StringconfigurationArn()The Amazon Resource Name (ARN) associated with the GameLift matchmaking configuration resource that is used with this ticket.StringconfigurationName()Name of the matchmaking configuration that is used with this ticket.InstantendTime()Time stamp indicating when the matchmaking request stopped being processed due to successful completion, timeout, or cancellation.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)IntegerestimatedWaitTime()Average amount of time (in seconds) that players are currently waiting for a match.GameSessionConnectionInfogameSessionConnectionInfo()Connection information for a new game session.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasPlayers()For responses, this returns true if the service returned a value for the Players property.List<Player>players()A set ofPlayerobjects, each representing a player to find matches for.List<SdkField<?>>sdkFields()static Class<? extends MatchmakingTicket.Builder>serializableBuilderClass()InstantstartTime()Time stamp indicating when this matchmaking request was received.MatchmakingConfigurationStatusstatus()Current status of the matchmaking request.StringstatusAsString()Current status of the matchmaking request.StringstatusMessage()Additional information about the current status.StringstatusReason()Code to explain the current status.StringticketId()A unique identifier for a matchmaking ticket.MatchmakingTicket.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
ticketId
public final String ticketId()
A unique identifier for a matchmaking ticket.
- Returns:
- A unique identifier for a matchmaking ticket.
-
configurationName
public final String 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
public final String 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
public final MatchmakingConfigurationStatus 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
StopMatchmakingoperation 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,
statuswill 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
StopMatchmakingoperation 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:
MatchmakingConfigurationStatus
-
-
statusAsString
public final String 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
StopMatchmakingoperation 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,
statuswill 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
StopMatchmakingoperation 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:
MatchmakingConfigurationStatus
-
-
statusReason
public final String statusReason()
Code to explain the current status. For example, a status reason may indicate when a ticket has returned to
SEARCHINGstatus 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
SEARCHINGstatus after a proposed match fails to receive player acceptances.
-
statusMessage
public final String statusMessage()
Additional information about the current status.
- Returns:
- Additional information about the current status.
-
startTime
public final Instant 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
public final Instant 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
public final List<Player> players()
A set of
Playerobjects, 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, thePlayerobjects 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
Playerobjects, 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, thePlayerobjects include the team the players were assigned to in the resulting match.
-
gameSessionConnectionInfo
public final GameSessionConnectionInfo 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
public final Integer 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
public MatchmakingTicket.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<MatchmakingTicket.Builder,MatchmakingTicket>
-
builder
public static MatchmakingTicket.Builder builder()
-
serializableBuilderClass
public static Class<? extends MatchmakingTicket.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String 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.
-
-