KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > test > clusteredsession > NodeAnswer


1 /*
2  * JBoss, Home of Professional Open Source
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8 package org.jboss.ejb3.test.clusteredsession;
9
10 import java.io.Serializable JavaDoc;
11 import java.rmi.dgc.VMID JavaDoc;
12
13 /** A data class used to track the identity of the cluster node.
14  *
15  * @author Ben Wang
16  */

17 public class NodeAnswer implements Serializable JavaDoc
18 {
19    public VMID JavaDoc nodeId = null;
20    public Object JavaDoc answer = null;
21
22    public NodeAnswer (VMID JavaDoc node, Object JavaDoc answer)
23    {
24       this.nodeId = node;
25       this.answer = answer;
26    }
27
28    public VMID JavaDoc getNodeId ()
29    {
30       return this.nodeId;
31    }
32
33    public Object JavaDoc getAnswer()
34    {
35       return this.answer;
36    }
37
38    public String JavaDoc toString ()
39    {
40       return "{ " + this.nodeId + " ; " + this.answer + " }";
41    }
42 }
43
Popular Tags