| Modifier and Type | Field and Description |
|---|---|
static int | PRIORITY_BUILD_REPLYBuild reply priority |
static int | PRIORITY_EXPLORATORYExploratory priority |
static int | PRIORITY_HIGHESTHighest priority |
static int | PRIORITY_HIS_BUILD_REQUESTHis build request priority |
static int | PRIORITY_HIS_NETDB_STOREHis netdb store priority |
static int | PRIORITY_LOWESTPriorities, higher is higher priority. |
static int | PRIORITY_MEDIUMMedium priority |
static int | PRIORITY_MY_BUILD_REQUESTMy build request priority |
static int | PRIORITY_MY_DATAMy data priority |
static int | PRIORITY_MY_NETDB_LOOKUPMy netdb lookup priority |
static int | PRIORITY_MY_NETDB_STOREMy netdb store priority |
static int | PRIORITY_MY_NETDB_STORE_LOWMy netdb store low priority |
static int | PRIORITY_NETDB_EXPLORENetdb explore priority |
static int | PRIORITY_NETDB_FLOODNetdb flood priority |
static int | PRIORITY_NETDB_HARVESTNetdb harvest priority |
static int | PRIORITY_NETDB_REPLYNetdb reply priority |
static int | PRIORITY_PARTICIPATINGParticipating priority |
| Constructor and Description |
|---|
OutNetMessage(RouterContext context)Null msg and target, zero expiration (used in OutboundMessageRegistry only) |
OutNetMessage(RouterContext context,
I2NPMessage msg,
long expiration,
int priority,
RouterInfo target)Standard constructor |
| Modifier and Type | Method and Description |
|---|---|
void | beginSend()begin the send |
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() |
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. |
int | getFailedTransportCount() |
List<String> | getFailedTransports()As of 0.9.55, changed from a Set to a List |
long | getLifetime() |
I2NPMessage | getMessage()Specifies the message to be sent. |
int | getMessageData(byte[] outBuffer)Copies the message data to outbuffer. |
long | getMessageId() |
int | getMessageSize()How large the message is, including the full 16 byte header. |
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() |
long | getSendTime() |
long | getSeqNum()For CDPQ |
RouterInfo | getTarget()Specifies the router to which the message should be delivered. |
long | getTransportQueued() |
void | resetCreatedTime()Reset creation time for dispatch age tracking on requeue |
void | setEnqueueTime(long now)For CDQ |
void | setOnFailedReplyJob(Job job)setOnFailedReplyJob. |
void | setOnFailedSendJob(Job job)setOnFailedSendJob. |
void | setOnReplyJob(ReplyJob job)setOnReplyJob. |
void | setOnSendJob(Job job)setOnSendJob. |
void | setReplySelector(MessageSelector selector)setReplySelector. |
void | setSeqNum(long num)For CDPQ |
void | setTransportQueued(long now)When the message entered the transport queue (set by transport send()). |
void | timestamp(String eventName)Stamp the message's progress. |
String | toString()toString. |
int | transportFailed(String transportStyle)As of 0.9.55, returns the previous number of failed transports. |
public static final int PRIORITY_BUILD_REPLY
public static final int PRIORITY_EXPLORATORY
public static final int PRIORITY_HIGHEST
public static final int PRIORITY_HIS_BUILD_REQUEST
public static final int PRIORITY_HIS_NETDB_STORE
public static final int PRIORITY_LOWEST
public static final int PRIORITY_MEDIUM
public static final int PRIORITY_MY_BUILD_REQUEST
public static final int PRIORITY_MY_DATA
public static final int PRIORITY_MY_NETDB_LOOKUP
public static final int PRIORITY_MY_NETDB_STORE
public static final int PRIORITY_MY_NETDB_STORE_LOW
public static final int PRIORITY_NETDB_EXPLORE
public static final int PRIORITY_NETDB_FLOOD
public static final int PRIORITY_NETDB_HARVEST
public static final int PRIORITY_NETDB_REPLY
public static final int PRIORITY_PARTICIPATING
public OutNetMessage(RouterContext context)
context - the router contextpublic OutNetMessage(RouterContext context, I2NPMessage msg, long expiration, int priority, RouterInfo target)
context - the router contextmsg - generally non-nullexpiration - the expiration timepriority - the prioritytarget - generally non-nullpublic void beginSend()
public void discardData()
public long getCreated()
public long getEnqueueTime()
getEnqueueTime in interface CDQEntrypublic long getExpiration()
public int getFailedTransportCount()
public List<String> getFailedTransports()
public long getLifetime()
public I2NPMessage getMessage()
public int getMessageData(byte[] outBuffer)
outBuffer - the buffer to copy topublic long getMessageId()
public int getMessageSize()
public String getMessageType()
public int getMessageTypeId()
public Job getOnFailedReplyJob()
public Job getOnFailedSendJob()
public ReplyJob getOnReplyJob()
public Job getOnSendJob()
public int getPriority()
getPriority in interface PQEntrypublic MessageSelector getReplySelector()
public long getSendBegin()
public long getSendTime()
public long getSeqNum()
public RouterInfo getTarget()
public long getTransportQueued()
public void resetCreatedTime()
public void setEnqueueTime(long now)
setEnqueueTime in interface CDQEntrynow - the enqueue timestamppublic void setOnFailedReplyJob(Job job)
public void setOnFailedSendJob(Job job)
public void setOnReplyJob(ReplyJob job)
public void setOnSendJob(Job job)
public void setReplySelector(MessageSelector selector)
public void setSeqNum(long num)
public void setTransportQueued(long now)
now - the queue timepublic void timestamp(String eventName)
eventName - what occurredpublic int transportFailed(String transportStyle)
transportStyle - the transport that failed