home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-05-08 | 1.8 KB | 63 lines |
- /*
- * Copyright (c) 1997-1998 Borland International, Inc. All Rights Reserved.
- *
- * This SOURCE CODE FILE, which has been provided by Borland as part
- * of a Borland product for use ONLY by licensed users of the product,
- * includes CONFIDENTIAL and PROPRIETARY information of Borland.
- *
- * USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS
- * OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
- * THE PRODUCT.
- *
- * IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD BORLAND, ITS RELATED
- * COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY CLAIMS
- * OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR DISTRIBUTION
- * OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES ARISING OUT OF
- * OR RESULTING FROM THE USE, MODIFICATION, OR DISTRIBUTION OF PROGRAMS
- * OR FILES CREATED FROM, BASED ON, AND/OR DERIVED FROM THIS SOURCE
- * CODE FILE.
- */
- package visibroker.samples.pass_by_value.dictionary;
-
- import java.util.Hashtable;
-
- public class DictionaryServer extends _DictionaryImplBase {
-
- Hashtable _hashtable = new Hashtable();
-
- DictionaryServer(String name) {
- super(name);
- }
-
- public int size() {
- return _hashtable.size();
- }
-
- public boolean isEmpty() {
- return _hashtable.isEmpty();
- }
-
- public Object get(Object key) {
- return _hashtable.get(key);
- }
-
- public Object put(Object key, Object value) {
- return _hashtable.put(key, value);
- }
-
- public Object remove(Object key) {
- return _hashtable.remove(key);
- }
-
- public static void main(String[] args) {
- org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null);
- org.omg.CORBA.BOA boa = orb.BOA_init();
- Dictionary impl = new DictionaryServer("Server");
- boa.obj_is_ready(impl);
- System.out.println(impl + " is ready.");
- boa.impl_is_ready();
- }
-
- }
-
-