java.lang.Object
it.auties.whatsapp.controller.DiscardingControllerSerializer
- All Implemented Interfaces:
ControllerSerializer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final LinkedList<UUID> private static final LinkedList<PhoneNumber> private static final DiscardingControllerSerializer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteSession(Controller<?> controller) Deletes a sessiondeserializeKeys(ClientType type, long phoneNumber) Serializes the keysdeserializeKeys(ClientType type, String alias) Serializes the keysdeserializeKeys(ClientType type, UUID id) Serializes the keysdeserializeStore(ClientType type, long phoneNumber) Serializes the storedeserializeStore(ClientType type, String alias) Serializes the storedeserializeStore(ClientType type, UUID id) Serializes the storedeserializeStoreKeysPair(UUID uuid, Long phoneNumber, String alias, ClientType clientType) Deserializes a store-keys pair from a list of possible identifierslistIds(ClientType type) Returns all the known IDslistPhoneNumbers(ClientType type) Returns all the known IDsserializeKeys(Keys keys, boolean async) Serializes the keysserializeStore(Store store, boolean async) Serializes the storestatic ControllerSerializerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.auties.whatsapp.controller.ControllerSerializer
attributeStore, linkMetadata, newStoreKeysPair
-
Field Details
-
SINGLETON
-
EMPTY_IDS
-
EMPTY_PHONE_NUMBERS
-
-
Constructor Details
-
DiscardingControllerSerializer
DiscardingControllerSerializer()
-
-
Method Details
-
singleton
-
listIds
Description copied from interface:ControllerSerializerReturns all the known IDs- Specified by:
listIdsin interfaceControllerSerializer- Parameters:
type- the non-null type of client- Returns:
- a non-null linked list
-
listPhoneNumbers
Description copied from interface:ControllerSerializerReturns all the known IDs- Specified by:
listPhoneNumbersin interfaceControllerSerializer- Parameters:
type- the non-null type of client- Returns:
- a non-null linked list
-
deserializeStoreKeysPair
public Optional<StoreKeysPair> deserializeStoreKeysPair(UUID uuid, Long phoneNumber, String alias, ClientType clientType) Description copied from interface:ControllerSerializerDeserializes a store-keys pair from a list of possible identifiers- Specified by:
deserializeStoreKeysPairin interfaceControllerSerializer- Parameters:
uuid- the nullable identifying unique idphoneNumber- the nullable identifying phone numberalias- the nullable identifying aliasclientType- the non-null client type- Returns:
- an optional store-keys pair
-
serializeKeys
Description copied from interface:ControllerSerializerSerializes the keys- Specified by:
serializeKeysin interfaceControllerSerializer- Parameters:
keys- the non-null keys to serializeasync- whether the operation should be executed asynchronously
-
serializeStore
Description copied from interface:ControllerSerializerSerializes the store- Specified by:
serializeStorein interfaceControllerSerializer- Parameters:
store- the non-null store to serializeasync- whether the operation should be executed asynchronously
-
deserializeKeys
Description copied from interface:ControllerSerializerSerializes the keys- Specified by:
deserializeKeysin interfaceControllerSerializer- Parameters:
type- the non-null type of clientid- the id of the keys- Returns:
- a non-null keys
-
deserializeKeys
Description copied from interface:ControllerSerializerSerializes the keys- Specified by:
deserializeKeysin interfaceControllerSerializer- Parameters:
type- the non-null type of clientphoneNumber- the phone number of the keys- Returns:
- a non-null keys
-
deserializeKeys
Description copied from interface:ControllerSerializerSerializes the keys- Specified by:
deserializeKeysin interfaceControllerSerializer- Parameters:
type- the non-null type of clientalias- the alias number of the keys- Returns:
- a non-null keys
-
deserializeStore
Description copied from interface:ControllerSerializerSerializes the store- Specified by:
deserializeStorein interfaceControllerSerializer- Parameters:
type- the non-null type of clientid- the id of the store- Returns:
- a non-null store
-
deserializeStore
Description copied from interface:ControllerSerializerSerializes the store- Specified by:
deserializeStorein interfaceControllerSerializer- Parameters:
type- the non-null type of clientphoneNumber- the phone number of the store- Returns:
- a non-null store
-
deserializeStore
Description copied from interface:ControllerSerializerSerializes the store- Specified by:
deserializeStorein interfaceControllerSerializer- Parameters:
type- the non-null type of clientalias- the alias of the store- Returns:
- a non-null store
-
deleteSession
Description copied from interface:ControllerSerializerDeletes a session- Specified by:
deleteSessionin interfaceControllerSerializer- Parameters:
controller- the non-null controller
-