|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.OutNetMessage
public class OutNetMessage
Wrap up an outbound I2NP message, along with the information associated with its delivery and jobs to be fired off if particular events occur.
Constructor Summary | |
---|---|
OutNetMessage(RouterContext context)
|
Method Summary | |
---|---|
void |
beginPrepare()
|
void |
beginSend()
|
void |
beginTransmission()
|
void |
discardData()
We've done what we need to do with the data from this message, though we may keep the object around for a while to use its ID, jobs, etc. |
boolean |
equals(java.lang.Object obj)
|
long |
getCreated()
|
java.lang.Exception |
getCreatedBy()
|
long |
getExpiration()
Specify the # ms since the epoch after which if the message has not been sent the OnFailedSend job should be fired and the message should be removed from the pool. |
java.util.Set |
getFailedTransports()
not thread safe - dont fail transports and iterate over this at the same time |
long |
getLifetime()
time since the message was created |
I2NPMessage |
getMessage()
Specifies the message to be sent |
int |
getMessageData(byte[] outBuffer)
|
long |
getMessageId()
|
long |
getMessageSize()
|
java.lang.String |
getMessageType()
|
int |
getMessageTypeId()
|
Job |
getOnFailedReplyJob()
If the Message selector is specified but it doesn't find a reply before its expiration passes, this job is enqueued. |
Job |
getOnFailedSendJob()
If the router could not be reached or the expiration passed, this job is enqueued. |
ReplyJob |
getOnReplyJob()
If the MessageSelector detects a reply, this job is enqueued |
Job |
getOnSendJob()
After the message is successfully passed to the router specified, the given job is enqueued. |
long |
getPreparationTime()
how long it took to prepare the i2np message for transmission (including serialization and transport layer encryption) |
int |
getPriority()
Specify the priority of the message, where higher numbers are higher priority. |
int |
getQueueSize()
number of messages ahead of this one going to the targetted peer when it is first enqueued |
MessageSelector |
getReplySelector()
Defines a MessageSelector to find a reply to this message. |
long |
getSendBegin()
when did the sending process begin |
long |
getSendTime()
time the transport tries to send the message (including any queueing) |
RouterInfo |
getTarget()
Specifies the router to which the message should be delivered. |
java.lang.Long |
getTimestamp(java.lang.String eventName)
|
java.util.Map |
getTimestamps()
|
long |
getTransmissionTime()
time during which the i2np message is actually in flight |
int |
hashCode()
|
void |
prepared()
|
void |
prepared(java.lang.Object buf)
|
java.lang.Object |
releasePreparationBuffer()
|
void |
setExpiration(long expiration)
|
void |
setMessage(I2NPMessage msg)
|
void |
setOnFailedReplyJob(Job job)
|
void |
setOnFailedSendJob(Job job)
|
void |
setOnReplyJob(ReplyJob job)
|
void |
setOnSendJob(Job job)
|
void |
setPriority(int priority)
|
void |
setQueueSize(int size)
|
void |
setReplySelector(MessageSelector selector)
|
void |
setTarget(RouterInfo target)
|
long |
timestamp(java.lang.String eventName)
Stamp the message's progress |
java.lang.String |
toString()
|
void |
transportFailed(java.lang.String transportStyle)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OutNetMessage(RouterContext context)
Method Detail |
---|
public long timestamp(java.lang.String eventName)
eventName
- what occurred
public java.util.Map getTimestamps()
public java.lang.Long getTimestamp(java.lang.String eventName)
public java.lang.Exception getCreatedBy()
public RouterInfo getTarget()
public void setTarget(RouterInfo target)
public I2NPMessage getMessage()
public void setMessage(I2NPMessage msg)
public java.lang.String getMessageType()
public int getMessageTypeId()
public long getMessageId()
public long getMessageSize()
public int getMessageData(byte[] outBuffer)
public int getPriority()
public void setPriority(int priority)
public long getExpiration()
public void setExpiration(long expiration)
public Job getOnSendJob()
public void setOnSendJob(Job job)
public Job getOnFailedSendJob()
public void setOnFailedSendJob(Job job)
public ReplyJob getOnReplyJob()
public void setOnReplyJob(ReplyJob job)
public Job getOnFailedReplyJob()
public void setOnFailedReplyJob(Job job)
public MessageSelector getReplySelector()
public void setReplySelector(MessageSelector selector)
public void transportFailed(java.lang.String transportStyle)
public java.util.Set getFailedTransports()
public long getSendBegin()
public void beginSend()
public void beginTransmission()
public void beginPrepare()
public void prepared()
public void prepared(java.lang.Object buf)
public java.lang.Object releasePreparationBuffer()
public long getCreated()
public long getLifetime()
public long getSendTime()
public long getTransmissionTime()
public long getPreparationTime()
public int getQueueSize()
public void setQueueSize(int size)
public void discardData()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |