|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.client.streaming.Packet
net.i2p.client.streaming.PacketLocal
public class PacketLocal
coordinate local attributes about a packet - send time, ack time, number of retries, etc.
Field Summary |
---|
Fields inherited from class net.i2p.client.streaming.Packet |
---|
DEFAULT_MAX_SIZE, FLAG_CLOSE, FLAG_DELAY_REQUESTED, FLAG_ECHO, FLAG_FROM_INCLUDED, FLAG_MAX_PACKET_SIZE_INCLUDED, FLAG_NO_ACK, FLAG_PROFILE_INTERACTIVE, FLAG_RESET, FLAG_SIGNATURE_INCLUDED, FLAG_SIGNATURE_REQUESTED, FLAG_SYNCHRONIZE, MAX_PAYLOAD_SIZE, MAX_STREAM_ID, STREAM_ID_UNKNOWN |
Constructor Summary | |
---|---|
PacketLocal(I2PAppContext ctx,
Destination to)
|
|
PacketLocal(I2PAppContext ctx,
Destination to,
Connection con)
|
Method Summary | |
---|---|
void |
ackReceived()
|
void |
cancelled()
|
java.lang.StringBuffer |
formatAsString()
|
int |
getAckTime()
how long after packet creation was it acked? |
Connection |
getConnection()
|
long |
getCreatedOn()
|
SessionKey |
getKeyUsed()
|
long |
getLastSend()
|
long |
getLifetime()
|
int |
getNACKs()
|
int |
getNumSends()
|
SimpleTimer.TimedEvent |
getResendEvent()
|
java.util.Set |
getTagsSent()
|
Destination |
getTo()
|
void |
incrementNACKs()
|
void |
incrementSends()
|
void |
prepare()
last minute update of ack fields, just before write/sign |
void |
setKeyUsed(SessionKey key)
|
void |
setResendPacketEvent(SimpleTimer.TimedEvent evt)
|
void |
setTagsSent(java.util.Set tags)
|
void |
setTo(Destination to)
|
boolean |
shouldSign()
|
void |
waitForAccept(int maxWaitMs)
wait until the data written is accepted into the outbound pool, which we throttle rather than accept arbitrary data and queue |
void |
waitForCompletion(int maxWaitMs)
wait until the data written either fails or succeeds |
boolean |
writeAccepted()
the write was accepted. |
boolean |
writeFailed()
did the write fail? |
boolean |
writeSuccessful()
did the write succeed? |
Methods inherited from class net.i2p.client.streaming.Packet |
---|
acquirePayload, getAckThrough, getNacks, getOptionalDelay, getOptionalFrom, getOptionalMaxSize, getOptionalSignature, getPayload, getPayloadSize, getReceiveStreamId, getResendDelay, getSendStreamId, getSequenceNum, isFlagSet, readPacket, releasePayload, setAckThrough, setFlag, setFlag, setFlags, setNacks, setOptionalDelay, setOptionalFrom, setOptionalMaxSize, setOptionalSignature, setPayload, setReceiveStreamId, setResendDelay, setSendStreamId, setSequenceNum, toId, toString, verifySignature, writePacket, writeSignedPacket, writtenSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PacketLocal(I2PAppContext ctx, Destination to)
public PacketLocal(I2PAppContext ctx, Destination to, Connection con)
Method Detail |
---|
public Destination getTo()
public void setTo(Destination to)
public SessionKey getKeyUsed()
public void setKeyUsed(SessionKey key)
public java.util.Set getTagsSent()
public void setTagsSent(java.util.Set tags)
public boolean shouldSign()
public void prepare()
public long getCreatedOn()
public long getLifetime()
public void incrementSends()
public void ackReceived()
public void cancelled()
public SimpleTimer.TimedEvent getResendEvent()
public int getAckTime()
public int getNumSends()
public long getLastSend()
public Connection getConnection()
public void incrementNACKs()
public int getNACKs()
public void setResendPacketEvent(SimpleTimer.TimedEvent evt)
public java.lang.StringBuffer formatAsString()
formatAsString
in class Packet
public void waitForAccept(int maxWaitMs)
MessageOutputStream.WriteStatus
waitForAccept
in interface MessageOutputStream.WriteStatus
public void waitForCompletion(int maxWaitMs)
MessageOutputStream.WriteStatus
waitForCompletion
in interface MessageOutputStream.WriteStatus
public boolean writeAccepted()
MessageOutputStream.WriteStatus
writeAccepted
in interface MessageOutputStream.WriteStatus
public boolean writeFailed()
MessageOutputStream.WriteStatus
writeFailed
in interface MessageOutputStream.WriteStatus
public boolean writeSuccessful()
MessageOutputStream.WriteStatus
writeSuccessful
in interface MessageOutputStream.WriteStatus
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |