|
||||||||||
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.
Field Summary | |
---|---|
static int |
PRIORITY_BUILD_REPLY
|
static int |
PRIORITY_EXPLORATORY
|
static int |
PRIORITY_HIGHEST
Priorities, higher is higher priority. |
static int |
PRIORITY_HIS_BUILD_REQUEST
|
static int |
PRIORITY_HIS_NETDB_STORE
|
static int |
PRIORITY_LOWEST
|
static int |
PRIORITY_MY_BUILD_REQUEST
|
static int |
PRIORITY_MY_DATA
may be adjusted +/- 25 for outbound traffic |
static int |
PRIORITY_MY_NETDB_LOOKUP
|
static int |
PRIORITY_MY_NETDB_STORE
|
static int |
PRIORITY_MY_NETDB_STORE_LOW
|
static int |
PRIORITY_NETDB_EXPLORE
|
static int |
PRIORITY_NETDB_FLOOD
|
static int |
PRIORITY_NETDB_HARVEST
|
static int |
PRIORITY_NETDB_REPLY
|
static int |
PRIORITY_PARTICIPATING
|
Constructor Summary | |
---|---|
OutNetMessage(RouterContext context)
|
Method Summary | |
---|---|
void |
beginSend()
|
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. |
void |
drop()
For CDQ |
long |
getCreated()
|
Exception |
getCreatedBy()
Deprecated. |
long |
getEnqueueTime()
For CDQ |
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. |
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()
|
String |
getMessageType()
For debugging only. |
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. |
int |
getPriority()
Specify the priority of the message, where higher numbers are higher priority. |
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) |
long |
getSeqNum()
For CDPQ |
RouterInfo |
getTarget()
Specifies the router to which the message should be delivered. |
Long |
getTimestamp(String eventName)
Deprecated. unused |
Map<String,Long> |
getTimestamps()
Deprecated. unused |
void |
prepared(Object buf)
|
Object |
releasePreparationBuffer()
|
void |
setEnqueueTime(long now)
For CDQ |
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 |
setReplySelector(MessageSelector selector)
|
void |
setSeqNum(long num)
For CDPQ |
void |
setTarget(RouterInfo target)
|
long |
timestamp(String eventName)
Stamp the message's progress. |
String |
toString()
|
void |
transportFailed(String transportStyle)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int PRIORITY_HIGHEST
public static final int PRIORITY_MY_BUILD_REQUEST
public static final int PRIORITY_MY_NETDB_LOOKUP
public static final int PRIORITY_MY_NETDB_STORE
public static final int PRIORITY_EXPLORATORY
public static final int PRIORITY_MY_DATA
public static final int PRIORITY_MY_NETDB_STORE_LOW
public static final int PRIORITY_HIS_BUILD_REQUEST
public static final int PRIORITY_BUILD_REPLY
public static final int PRIORITY_NETDB_REPLY
public static final int PRIORITY_HIS_NETDB_STORE
public static final int PRIORITY_NETDB_FLOOD
public static final int PRIORITY_PARTICIPATING
public static final int PRIORITY_NETDB_EXPLORE
public static final int PRIORITY_NETDB_HARVEST
public static final int PRIORITY_LOWEST
Constructor Detail |
---|
public OutNetMessage(RouterContext context)
Method Detail |
---|
public long timestamp(String eventName)
eventName
- what occurred
public Map<String,Long> getTimestamps()
public Long getTimestamp(String eventName)
public Exception getCreatedBy()
public RouterInfo getTarget()
public void setTarget(RouterInfo target)
public I2NPMessage getMessage()
public void setMessage(I2NPMessage msg)
public String getMessageType()
public int getMessageTypeId()
public long getMessageId()
public long getMessageSize()
public int getMessageData(byte[] outBuffer)
public int getPriority()
getPriority
in interface PQEntry
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(String transportStyle)
public Set getFailedTransports()
public long getSendBegin()
public void beginSend()
public void prepared(Object buf)
public Object releasePreparationBuffer()
public long getCreated()
public long getLifetime()
public long getSendTime()
public void setEnqueueTime(long now)
setEnqueueTime
in interface CDQEntry
public long getEnqueueTime()
getEnqueueTime
in interface CDQEntry
public void drop()
drop
in interface CDQEntry
public void setSeqNum(long num)
setSeqNum
in interface PQEntry
public long getSeqNum()
getSeqNum
in interface PQEntry
public void discardData()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |