public P2PDPInitiatorRequestMessage(ResourceQuery resourceQuery, RequestProfile reqProfile) { super(CP_MSG_IREQ, resourceQuery.getRequestIdentifier()); this.resourceQuery = resourceQuery; this.maxReplyDelay = reqProfile.getNumMaxReplyDelay(); this.numMaxReplies = reqProfile.getNumMaxReplies(); this.maxTTL = reqProfile.getRequestDiameter(); this.ctxtInfo = reqProfile.getContextInfo(); }
// IMPRIME public String toString() { String messageStr = super.toString() + "\nMaximum Reply Delay: " + maxReplyDelay + "\nNumber Maximum of Replies: " + numMaxReplies + "\nRequest Diameter: " + maxTTL + resourceQuery.toString() + ctxtInfo.toString(); return messageStr; }
public P2PDPInitiatorRequestMessage( ResourceQuery resourceQuery, long maxReplyDelay, int numMaxReplies, int ttl, ContextInformation ctxtInfo) { super(CP_MSG_IREQ, resourceQuery.getRequestIdentifier()); this.resourceQuery = resourceQuery; this.maxReplyDelay = maxReplyDelay; this.numMaxReplies = numMaxReplies; this.maxTTL = ttl; this.ctxtInfo = ctxtInfo; }