projects
/
jSite2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
create id in constructor
[jSite2.git]
/
src
/
net
/
pterodactylus
/
jsite
/
core
/
Node.java
diff --git
a/src/net/pterodactylus/jsite/core/Node.java
b/src/net/pterodactylus/jsite/core/Node.java
index
5a8ec89
..
bb61ee9
100644
(file)
--- a/
src/net/pterodactylus/jsite/core/Node.java
+++ b/
src/net/pterodactylus/jsite/core/Node.java
@@
-21,7
+21,9
@@
package net.pterodactylus.jsite.core;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeListener;
+import net.pterodactylus.jsite.util.IdGenerator;
import net.pterodactylus.util.beans.AbstractBean;
import net.pterodactylus.util.beans.AbstractBean;
+import net.pterodactylus.util.number.Hex;
/**
* Container for a Freenet node. A Node is capable of notifying
/**
* Container for a Freenet node. A Node is capable of notifying
@@
-53,6
+55,13
@@
public class Node extends AbstractBean {
private int port;
/**
private int port;
/**
+ * Creates a new node.
+ */
+ public Node() {
+ id = Hex.toHex(IdGenerator.generateId());
+ }
+
+ /**
* Returns the internal ID of the node.
*
* @return The internal ID of the node
* Returns the internal ID of the node.
*
* @return The internal ID of the node