Class DittoConnectionRequest
-
Method Summary
Modifier and TypeMethodDescriptionboolean@NonNull DittoConnectionTypeReturns the connection type used to establish this particular connection.Deprecated.@NonNull StringReturns a JSON string of metadata for the remote peer provided by the identity service.@NonNull DittoJsonSerializable.ObjectValueReturns metadata for the remote peer provided by the identity service.@NonNull StringThe unique peer key of the remote peer.Deprecated.usegetPeerMetadataObject()withDittoJsonSerializable.ObjectValue.toMap()on the returned value.@NonNull StringReturns a JSON string of metadata associated with the remote peer.@NonNull DittoJsonSerializable.ObjectValueReturns metadata associated with the remote peer.inthashCode()
-
Method Details
-
getPeerKey
-
getPeerMetadata
Deprecated.usegetPeerMetadataObject()withDittoJsonSerializable.ObjectValue.toMap()on the returned value.Returns metadata associated with the remote peer.
Returns an empty dictionary if the remote peer has not set any metadata.
Set peer metadata for the local peer using
DittoPresence.setPeerMetadata(DittoJsonSerializable.ObjectValue)orDittoPresence.setPeerMetadataJsonString(String).This is a convenience method that wraps
getPeerMetadataObject().- Returns:
- an unmodifiable map of peer metadata.
-
getPeerMetadataObject
Returns metadata associated with the remote peer.
Returns an empty dictionary if the remote peer has not set any metadata.
Set peer metadata for the local peer using
DittoPresence.setPeerMetadata(DittoJsonSerializable.ObjectValue)orDittoPresence.setPeerMetadataJsonString(String).This is a convenience method that wraps
getPeerMetadataJson().To convert the value to a plain
Map, callDittoJsonSerializable.ObjectValue.toMap()on the returned value.- Returns:
- a
DittoJsonSerializable.ObjectValuecontaining the peer metadata.
-
getPeerMetadataJson
Returns a JSON string of metadata associated with the remote peer.
Returns a JSON string representing an empty dictionary if the remote peer has not set any metadata.
Set peer metadata for the local peer using
DittoPresence.setPeerMetadata(DittoJsonSerializable.ObjectValue)orDittoPresence.setPeerMetadataJsonString(String).- Returns:
- the peer metadata as a JSON string.
-
getIdentityServiceMetadata
Deprecated.usegetIdentityServiceMetadataObject()withDittoJsonSerializable.ObjectValue.toMap()on the returned value.Returns metadata for the remote peer provided by the identity service.
Use an authentication webhook to set this value. See Ditto's online documentation for more information on how to configure an authentication webhook.
This is a convenience method that wraps
getIdentityServiceMetadataObject().- Returns:
- an unmodifiable map of identity service metadata.
-
getIdentityServiceMetadataObject
Returns metadata for the remote peer provided by the identity service.
Use an authentication webhook to set this value. See Ditto's online documentation for more information on how to configure an authentication webhook.
This is a convenience method that wraps
getIdentityServiceMetadataJson().To convert the value to a plain
Map, callDittoJsonSerializable.ObjectValue.toMap()on the returned value.- Returns:
- a
DittoJsonSerializable.ObjectValuecontaining the identity service metadata.
-
getIdentityServiceMetadataJson
Returns a JSON string of metadata for the remote peer provided by the identity service.
Use an authentication webhook to set this value. See Ditto's online documentation for more information on how to configure an authentication webhook.
- Returns:
- the identity service metadata as a JSON string.
-
getConnectionType
Returns the connection type used to establish this particular connection.
Use this to allow or deny only specific types of connections.
- Returns:
- the
DittoConnectionTypefor this connection.
-
hashCode
-
equals
-
getIdentityServiceMetadataObject()withDittoJsonSerializable.ObjectValue.toMap()on the returned value.