Class GameSessionConnectionInfo

    • Method Detail

      • gameSessionArn

        public final String gameSessionArn()

        A unique identifier for the game session. Use the game session ID.

        Returns:
        A unique identifier for the game session. Use the game session ID.
      • ipAddress

        public final String ipAddress()

        The IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

        Returns:
        The IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
      • dnsName

        public final String dnsName()

        The DNS identifier assigned to the instance that is running the game session. Values have the following format:

        • TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.

        • Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)

        When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.

        Returns:
        The DNS identifier assigned to the instance that is running the game session. Values have the following format:

        • TLS-enabled fleets: <unique identifier>.<region identifier>.amazongamelift.com.

        • Non-TLS-enabled fleets: ec2-<unique identifier>.compute.amazonaws.com. (See Amazon EC2 Instance IP Addressing.)

        When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.

      • port

        public final Integer port()

        The port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.

        Returns:
        The port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
      • hasMatchedPlayerSessions

        public final boolean hasMatchedPlayerSessions()
        For responses, this returns true if the service returned a value for the MatchedPlayerSessions property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() 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.
      • matchedPlayerSessions

        public final List<MatchedPlayerSession> matchedPlayerSessions()

        A collection of player session IDs, one for each player ID that was included in the original matchmaking request.

        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 hasMatchedPlayerSessions() method.

        Returns:
        A collection of player session IDs, one for each player ID that was included in the original matchmaking request.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • 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.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)