public static interface UndeliveredStanzaManager.PersistenceMechanism
If the SDK is off-loaded from memory for some reason (typically after
shutdown), it is important that all the in-flight packets are persisted
to some store (file system, database etc).
UndeliveredStanzaManager uses UndeliveredStanzaManager.PersistenceMechanism (which
will typically be injected by the application) to persist in-flight
packets. These packets will be read when SDK is loaded again into the
memory and will be sent to XMPPPacketWriter to send them to
server.
| Modifier and Type | Method and Description |
|---|---|
List<Stanza> |
readAll()
Read all the stanzas from persistent store and delete them.
|
void |
remove(int stanzaCount)
Remove number of stanza from persistent store.
|
void |
truncateUndeliverStanzas()
Delete All stanzas from store.
|
void |
write(List<Stanza> stanzas)
Write a stanza to persistent store.
|
void |
write(Stanza stanza)
Write a stanza to persistent store.
|
void write(Stanza stanza) throws IOException
stanza - stanzaIOException - IOExceptionvoid write(List<Stanza> stanzas) throws IOException
stanzas - stanzasIOException - IOExceptionvoid remove(int stanzaCount)
throws IOException
stanzaCount - stanzaCountIOException - IOExceptionList<Stanza> readAll() throws IOException
IOException - IOExceptionvoid truncateUndeliverStanzas()
Copyright © 2019. All rights reserved.