Class MessageState


  • class MessageState
    extends Object
    Contains the state of a payload message being sent to a peer. Originally was a general-purpose waiter. Then we got rid of guaranteed delivery. Then we stopped waiting for accept in best-effort delivery. Brought back to life for asynchronous status delivery to the client.
    • Constructor Detail

      • MessageState

        public MessageState​(I2PAppContext ctx,
                            long nonce,
                            String prefix)
        For synchronous waiting for accept with waitForAccept(). UNUSED.
    • Method Detail

      • receive

        public void receive​(int status)
      • setMessageId

        public void setMessageId​(MessageId id)
      • getMessageId

        public MessageId getMessageId()
      • getElapsed

        public long getElapsed()
      • getExpires

        public long getExpires()
        Since:
        0.9.14
      • wasAccepted

        public boolean wasAccepted()
        Returns:
        true if accepted (fixme and not failed)
        Since:
        0.9.14
      • wasSuccessful

        public boolean wasSuccessful()
        Returns:
        true if successful
        Since:
        0.9.14
      • cancel

        public void cancel()