KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > ubik > rmi > examples > StatelessUbikBar


1 package org.sapia.ubik.rmi.examples;
2
3 import java.util.HashMap JavaDoc;
4
5
6 /**
7  * @author Yanick Duchesne
8  * <dl>
9  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
10  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
11  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
12  * </dl>
13  */

14 public class StatelessUbikBar implements Bar {
15   HashMap JavaDoc map = new HashMap JavaDoc();
16   int hashcode;
17
18   public StatelessUbikBar(int hashCode) throws java.rmi.RemoteException JavaDoc {
19     map.put("foo", "bar!!!");
20     hashcode = hashCode;
21   }
22
23   /**
24    * @see org.sapia.ubik.rmi.Bar#getMsg()
25    */

26   public String JavaDoc getMsg() {
27     System.out.println("getMsg()... @" + Integer.toHexString(hashcode));
28
29     return ((String JavaDoc) map.get("foo")) + "@" + Integer.toHexString(hashcode);
30   }
31 }
32
Popular Tags