-
public class Auth.TokenDetailsContains an Ably Token and its associated metadata.
-
-
Constructor Summary
Constructors Constructor Description Auth.TokenDetails()Auth.TokenDetails(String token)
-
Method Summary
Modifier and Type Method Description static Auth.TokenDetailsfromJSON(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.TokenDetailsfromJson(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.TokenDetailsfromJsonElement(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. JsonObjectasJsonElement()Convert a TokenDetails into a JSON object. StringasJson()Convert a TokenDetails into a JSON string. booleanequals(Object obj)Check equality of a TokenDetails inthashCode()-
-
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.
-
hashCode
int hashCode()
-
-
-
-