package at.ac.tuwien.softwarearchitecture.swazam.common.infos;

import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * 
 * Info that can be used to fully describe a Peer and connect to it from another Peer,
 * such as to forward a fingerprint matching request.
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "PeerInfo")
public class PeerInfo implements Serializable{
	/**
	 * Unique Peer ID
	 */

    @XmlAttribute(name = "UUID", required = true)
	private int peerID;
	
	/*
	 * IP at which Peer is located
	 */
    @XmlAttribute(name = "ip", required = true)
	private String ip;
	
	/*
	 * Port at which Peer Socket API listens
	 */
    @XmlAttribute(name = "port", required = true)
	private int port;

	public PeerInfo() {
		super();
	}

	public PeerInfo(int peerID, String ip, int port) {
		super();
		this.peerID = peerID;
		this.ip = ip;
		this.port = port;
	}

	public int getPeerID() {
		return peerID;
	}

	public void setPeerID(int peerID) {
		this.peerID = peerID;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

}

@@ -890,16 +890,403 @@
 nt port;
+%0A    %0A%09@XmlAttribute(name = %22username%22)%0A%09private String username;%0A%09%0A%09@XmlAttribute(name = %22password%22)%0A%09private String password;%0A%0A%09public String getUsername() %7B%0A%09%09return username;%0A%09%7D%0A%0A%09public void setUsername(String username) %7B%0A%09%09this.username = username;%0A%09%7D%0A%0A%09public String getPassword() %7B%0A%09%09return password;%0A%09%7D%0A%0A%09public void setPassword(String password) %7B%0A%09%09this.password = password;%0A%09%7D
 %0A%0A%09publi

update PeerInfo