Package 

Class Auth.TokenDetails

    • Method Summary

      Modifier and Type Method Description
      static Auth.TokenDetails fromJSON(JsonObject json) A static factory method to create a TokenDetails object from a deserializedTokenDetails-like object or a JSON stringified TokenDetails object.This method is provided to minimize bugs as a result of differing types by platform for fields such as timestamp or ttl.For example, in Ruby ttl in the TokenDetails object is exposed in seconds as that is idiomatic for the language,yet when serialized to JSON using to_json it is automatically converted to the Ably standard which is milliseconds.By using the fromJson() method when constructing a TokenDetails object,Ably ensures that all fields are consistently serialized and deserialized across platforms.
      static Auth.TokenDetails fromJson(String json) A static factory method to create a TokenDetails object from a deserializedTokenDetails-like object or a JSON stringified TokenDetails object.This method is provided to minimize bugs as a result of differing types by platform for fields such as timestamp or ttl.For example, in Ruby ttl in the TokenDetails object is exposed in seconds as that is idiomatic for the language,yet when serialized to JSON using to_json it is automatically converted to the Ably standard which is milliseconds.By using the fromJson() method when constructing a TokenDetails object,Ably ensures that all fields are consistently serialized and deserialized across platforms.
      static Auth.TokenDetails fromJsonElement(JsonObject json) A static factory method to create a TokenDetails object from a deserializedTokenDetails-like object or a JSON stringified TokenDetails object.This method is provided to minimize bugs as a result of differing types by platform for fields such as timestamp or ttl.For example, in Ruby ttl in the TokenDetails object is exposed in seconds as that is idiomatic for the language,yet when serialized to JSON using to_json it is automatically converted to the Ably standard which is milliseconds.By using the fromJson() method when constructing a TokenDetails object,Ably ensures that all fields are consistently serialized and deserialized across platforms.
      JsonObject asJsonElement() Convert a TokenDetails into a JSON object.
      String asJson() Convert a TokenDetails into a JSON string.
      boolean equals(Object obj) Check equality of a TokenDetails
      int hashCode()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Auth.TokenDetails

        Auth.TokenDetails()
      • Auth.TokenDetails

        Auth.TokenDetails(String token)
    • Method Detail

      • fromJSON

        @Deprecated() static Auth.TokenDetails fromJSON(JsonObject json)

        A static factory method to create a TokenDetails object from a deserializedTokenDetails-like object or a JSON stringified TokenDetails object.This method is provided to minimize bugs as a result of differing types by platform for fields such as timestamp or ttl.For example, in Ruby ttl in the TokenDetails object is exposed in seconds as that is idiomatic for the language,yet when serialized to JSON using to_json it is automatically converted to the Ably standard which is milliseconds.By using the fromJson() method when constructing a TokenDetails object,Ably ensures that all fields are consistently serialized and deserialized across platforms.

        Spec: TD7

        Parameters:
        json - A deserialized TokenDetails-like object or a JSON stringified TokenDetails object.
      • fromJson

         static Auth.TokenDetails fromJson(String json)

        A static factory method to create a TokenDetails object from a deserializedTokenDetails-like object or a JSON stringified TokenDetails object.This method is provided to minimize bugs as a result of differing types by platform for fields such as timestamp or ttl.For example, in Ruby ttl in the TokenDetails object is exposed in seconds as that is idiomatic for the language,yet when serialized to JSON using to_json it is automatically converted to the Ably standard which is milliseconds.By using the fromJson() method when constructing a TokenDetails object,Ably ensures that all fields are consistently serialized and deserialized across platforms.

        Spec: TD7

        Parameters:
        json - A deserialized TokenDetails-like object or a JSON stringified TokenDetails object.
      • fromJsonElement

         static Auth.TokenDetails fromJsonElement(JsonObject json)

        A static factory method to create a TokenDetails object from a deserializedTokenDetails-like object or a JSON stringified TokenDetails object.This method is provided to minimize bugs as a result of differing types by platform for fields such as timestamp or ttl.For example, in Ruby ttl in the TokenDetails object is exposed in seconds as that is idiomatic for the language,yet when serialized to JSON using to_json it is automatically converted to the Ably standard which is milliseconds.By using the fromJson() method when constructing a TokenDetails object,Ably ensures that all fields are consistently serialized and deserialized across platforms.

        Spec: TD7

        Parameters:
        json - A deserialized TokenDetails-like object or a JSON stringified TokenDetails object.
      • asJsonElement

         JsonObject asJsonElement()

        Convert a TokenDetails into a JSON object.

      • asJson

         String asJson()

        Convert a TokenDetails into a JSON string.

      • equals

         boolean equals(Object obj)

        Check equality of a TokenDetails