dhtpeertestmessage.java

来自「p2p仿真器。开发者可以工作在覆盖层中进行创造和测试逻辑算法或者创建和测试新的服」· Java 代码 · 共 59 行

JAVA
59
字号
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 + =
减小字号Ctrl + -
显示快捷键?