Package net.i2p.client.streaming.impl
Interface MessageOutputStream.WriteStatus
-
- All Known Implementing Classes:
PacketLocal
- Enclosing class:
- MessageOutputStream
public static interface MessageOutputStream.WriteStatusDefine a way to detect the status of a write
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidwaitForAccept(int maxWaitMs)Wait until the data written is accepted into the outbound pool, (i.e.voidwaitForCompletion(int maxWaitMs)Wait until the data written either fails or succeeds.booleanwriteAccepted()Was the write was accepted.booleanwriteFailed()did the write fail?booleanwriteSuccessful()did the write succeed?
-
-
-
Method Detail
-
waitForCompletion
void waitForCompletion(int maxWaitMs) throws IOException, InterruptedExceptionWait until the data written either fails or succeeds. Success means an ACK FROM THE FAR END.- Parameters:
maxWaitMs- -1 = forever- Throws:
IOExceptionInterruptedException
-
waitForAccept
void waitForAccept(int maxWaitMs) throws IOException, InterruptedExceptionWait until the data written is accepted into the outbound pool, (i.e. the outbound window is not full) which we throttle rather than accept arbitrary data and queue- Parameters:
maxWaitMs- -1 = forever- Throws:
IOExceptionInterruptedException
-
writeAccepted
boolean writeAccepted()
Was the write was accepted. aka did the socket not close?
-
writeFailed
boolean writeFailed()
did the write fail?
-
writeSuccessful
boolean writeSuccessful()
did the write succeed?
-
-