⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dhtpeertestmessage.java

📁 p2p仿真器。开发者可以工作在覆盖层中进行创造和测试逻辑算法或者创建和测试新的服务。PlanetSim还可以将仿真代码平稳转换为在Internet上的实验代码
💻 JAVA
字号:
package planet.test.broadcast;import planet.commonapi.*;import java.util.*;/** * @author Carles Pairot   <cpairot@etse.urv.es> * @version 1.0 * Message to be send in the Broadcast Test. */public class DHTPeerTestMessage implements Message {  private String data = null;  private Id sourceNodeId = null;  private Properties props = null;  /**   * Constructor for this Message.    * @param sourceNodeId Id of the source Node.   * @param data String with all data to be send.   */  public DHTPeerTestMessage (Id sourceNodeId, String data) {  	this.sourceNodeId = sourceNodeId;    this.data = data;  }  /**   * Gets the data.   * @return String with all data of this message.   */  public String getData() {    return data;  }    /**   * Sets new data.   * @param data New data to be set.   */  public void setData(String data) {  	this.data = data;  }    /**   * Gets Id of source Node, who sends this message.   * @return Id of source Node.   */  public Id getSourceNodeId() {  	return sourceNodeId;  }    /**   * Sets a new Id of source Node, who sends (re-send)   * this message.   * @param id Id of the new source Node.   */  public void setSourceNodeId(Id id) {  	this.sourceNodeId = id;  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -