Package org.signal.libsignal.protocol
Class ServiceId
-
- All Implemented Interfaces:
-
java.lang.Comparable
public abstract class ServiceId implements Comparable<T>
Typed representation of a Signal service ID, which can be one of various types.
Conceptually this is a UUID in a particular "namespace" representing a particular way to reach a user on the Signal service.
The sort order for ServiceIds is first by kind (ACI, then PNI), then lexicographically by the bytes of the UUID.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumServiceId.KindThe kind of a service ID.
public classServiceId.InvalidServiceIdExceptionpublic final classServiceId.Acipublic final classServiceId.Pni
-
Method Summary
Modifier and Type Method Description booleanequals(Object other)inthashCode()intcompareTo(ServiceId other)StringtoString()StringtoLogString()Array<byte>toServiceIdBinary()Array<byte>toServiceIdFixedWidthBinary()StringtoServiceIdString()UUIDgetRawUUID()ServiceId.KindgetKind()static ServiceIdparseFromString(String serviceIdString)static ServiceIdparseFromBinary(Array<byte> serviceIdBinary)static ServiceIdparseFromFixedWidthBinary(Array<byte> storage)static Array<byte>toConcatenatedFixedWidthBinary(Collection<ServiceId> serviceIds)-
-
Method Detail
-
hashCode
int hashCode()
-
toLogString
String toLogString()
-
toServiceIdBinary
Array<byte> toServiceIdBinary()
-
toServiceIdFixedWidthBinary
Array<byte> toServiceIdFixedWidthBinary()
-
toServiceIdString
String toServiceIdString()
-
getRawUUID
UUID getRawUUID()
-
getKind
ServiceId.Kind getKind()
-
parseFromString
static ServiceId parseFromString(String serviceIdString)
-
parseFromBinary
static ServiceId parseFromBinary(Array<byte> serviceIdBinary)
-
parseFromFixedWidthBinary
@CalledFromNative() static ServiceId parseFromFixedWidthBinary(Array<byte> storage)
-
toConcatenatedFixedWidthBinary
static Array<byte> toConcatenatedFixedWidthBinary(Collection<ServiceId> serviceIds)
-
-
-
-