public interface Writer
Packet instances and writes
them on the wire. WRITE operations are available in both synchronous and
asynchronous fashion.| Modifier and Type | Method and Description |
|---|---|
boolean |
isShutdown() |
boolean |
isWriting() |
boolean |
shutdown()
Shutdown the writer after writing all the queued packets; however writer
will stop accepting packets for writing immediately.
|
boolean |
shutdownNow()
Shutdown the writer immediately.
|
void |
start()
Start
Writer; this will start writer thread and will turn on the
'Started' flag. |
boolean |
writeAsync(Stanza stanza)
Add a Stanza to writerWaitingQ.
|
boolean |
writeNextAsync(Stanza stanza)
Add a Stanza at the HEAD of writerWaitingQ.
|
void |
writeSync(Packet packet)
Write a packet synchronously.
|
void start()
Writer; this will start writer thread and will turn on the
'Started' flag.void writeSync(Packet packet) throws NetworkException
This operation should never be used to by applications using SDK; it is solely for internal use. Moreover, this method does not updates counters/ACK status etc which may corrupt the stream state if used to transmit stanza packets
packet - pakcet to be written on connectionNetworkException - if any network related error occurrsboolean writeAsync(Stanza stanza)
stanza - Stanza packet to be sent to serverboolean writeNextAsync(Stanza stanza)
stanza - Stanza packet to be sent to serverboolean isWriting()
boolean isShutdown()
boolean shutdown()
boolean shutdownNow()
Copyright © 2019. All rights reserved.