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

📄 nodeobject.java

📁 We intend to develop a wifi enabled p2p file sharing system on a linux platform using jxta and java.
💻 JAVA
字号:
package edu.uiuc.cs.cs327.linuxwifi.services;

import java.awt.*;
import net.jxta.protocol.PeerAdvertisement;


  /**
    * Object that is returned for each element of the knownNodesVector
    * and is also maintained for each node that is accessed for uploads
    * and downloads.
    */    


public class NodeObject {

    String nodeName;
    String nodeID;
    PeerAdvertisement peerAdv;

  /**
    * Constructs a NodeObject class for the associated node
    * @param aUserName username associated with this node
    * @param aIPAddress is the ip address associated with this node
    * @param aNodeName is the name associated with this node
    */
	
  public NodeObject(PeerAdvertisement pa) {  	
    nodeName = pa.getName();
    nodeID= pa.getID().toString();
    peerAdv = pa;
  }
      
  /**
    * Gets the user name
    * @return a string referring to the associated username
    */
    
  public String getNodeName()
  {
      return(nodeName);
  }
  
  /**
    * Gets the ip address
    * @return a string referring to the associated ip address
    */
    
  
  public String getNodeID()
  {
    return(nodeID);
  }
  
  public PeerAdvertisement getPeerAdvertisement(){
     return(peerAdv); 
  }

  
}

⌨️ 快捷键说明

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