java.lang.Object
net.i2p.client.streaming.impl.ConnectionDataReceiver.FailedWriteStatus
- All Implemented Interfaces:
MessageOutputStream.WriteStatus
- Enclosing class:
ConnectionDataReceiver
private static class ConnectionDataReceiver.FailedWriteStatusextends Object implements MessageOutputStream.WriteStatus
Failed write status.
Field Summary
FieldsConstructor Summary
ConstructorsConstructorDescriptionFailedWriteStatus(IOException error) Holds the I/O error to rethrow from the wait methods.Method Summary
All MethodsModifier and TypeMethodDescriptionvoidwaitForAccept(int maxWaitMs) Wait for the write to be accepted.voidwaitForCompletion(int maxWaitMs) Wait for the write to complete.booleanWhether the write was accepted.booleanWhether the write failed.
Field Details
_error
The I/O error that caused the failure.
Constructor Details
FailedWriteStatus
Holds the I/O error to rethrow from the wait methods.- Parameters:
error- the io error to rethrow
Method Details
waitForCompletion
Wait for the write to complete.- Specified by:
waitForCompletionin interfaceMessageOutputStream.WriteStatus- Parameters:
maxWaitMs- maximum wait time in milliseconds (-1 means wait forever)- Throws:
IOException- if write fails or times out
waitForAccept
Wait for the write to be accepted.- Specified by:
waitForAcceptin interfaceMessageOutputStream.WriteStatus- Parameters:
maxWaitMs- maximum wait time in milliseconds (-1 means wait forever)- Throws:
IOException- if acceptance fails or times out
writeAccepted
public boolean writeAccepted()Whether the write was accepted.- Specified by:
writeAcceptedin interfaceMessageOutputStream.WriteStatus- Returns:
- true if accepted, false otherwise
writeFailed
public boolean writeFailed()Whether the write failed.- Specified by:
writeFailedin interfaceMessageOutputStream.WriteStatus- Returns:
- true if failed, false otherwise