KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > dyade > aaa > agent > HAStateReply


1 /*
2  * Copyright (C) 2004 - France Telecom R&D
3  * Copyright (C) 2004 - ScalAgent Distributed Technologies
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18  * USA.
19  *
20  * Initial developer(s): ScalAgent Distributed Technologies
21  * Contributor(s):
22  */

23 package fr.dyade.aaa.agent;
24
25 import java.io.Serializable JavaDoc;
26
27 /**
28  * Message used by the master component to send the server state.
29  */

30 public class HAStateReply implements Serializable JavaDoc {
31   /** Engine state */
32   long now;
33   int stamp;
34   byte[] agents = null;
35   byte[] messages = null;
36
37   /** Network state */
38   private byte[] clock = null;
39
40   public HAStateReply() {
41   }
42
43   public void setNetworkStamp(byte[] clock) {
44     this.clock = clock;
45   }
46
47   public byte[] getNetworkStamp() {
48     return clock;
49   }
50
51   public String JavaDoc toString() {
52     StringBuffer JavaDoc buf = new StringBuffer JavaDoc();
53
54     buf.append("(HAStateReply(").append(super.toString());
55     buf.append("now=").append(now);
56     buf.append(",stamp=").append(stamp);
57     buf.append("],clock=").append(clock);
58     buf.append("))");
59
60     return buf.toString();
61   }
62 }
63
Popular Tags