3 import java.io.ObjectOutputStream;
4 import java.io.OutputStream;
6 public class Node implements java.io.Serializable {
7 private static final long serialVersionUID = 1L;
11 private String name = null;
12 private String appliName = null;
13 private boolean aliveFlag;
14 private JaceInterface stub;
15 private long aliveTime = System.currentTimeMillis();
16 @SuppressWarnings("unused")
18 private int nbOfBeats = 0;
19 private Object o = null;
22 public Node(JaceInterface s) {
26 public void setOutputStream(OutputStream out) {
30 public void setId( long _id )
40 public OutputStream getOutputStream() {
41 return (ObjectOutputStream) o;
44 public synchronized void setName(String name) {
48 public synchronized void setIP(String adr) {
52 public synchronized void setAliveFlag(boolean val) {
56 public synchronized void setAliveTime() {
57 aliveTime = System.currentTimeMillis();
60 public synchronized long getAliveTime() {
64 public synchronized void setPort(int portOfComm) {
68 public synchronized void setAppliName(String appli) {
69 this.appliName = appli;
72 public synchronized String getAppliName() {
76 public synchronized void setNbOfBeats(int nb) {
80 public synchronized JaceInterface getStub() {
84 public synchronized String getName() {
88 public synchronized void incrementNbOfBeats() {
90 if (nbOfBeats > 10000000) {
95 public synchronized boolean getAliveFlag() {
99 public synchronized int getNbOfBeats() {
103 public synchronized String getIP() {