Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/synchrona/jred/irlap/DiscoveryLog.java


1   /*
2   **************************************************************************
3   ** $Header: /cvsroot/jred/jred/src/com/synchrona/jred/irlap/DiscoveryLog.java,v 1.1.1.1 2000/07/05 04:41:52 mpatters Exp $
4   **
5   ** Copyright (C) 2000 Synchrona, Inc. All rights reserved.
6   **
7   ** This file is part of JRed, a 100% Java implementation of the IrDA
8   ** infrared communications protocols.
9   **
10  ** This file may be distributed under the terms of the Synchrona Public
11  ** License as defined by Synchrona, Inc. and appearing in the file
12  ** LICENSE included in the packaging of this file. The Synchrona Public
13  ** License is based on the Q Public License as defined by Troll Tech AS
14  ** of Norway; it differs only in its use of the courts of Florida, USA
15  ** rather than those of Oslo, Norway.
16  **************************************************************************
17  */
18  package com.synchrona.jred.irlap;
19  
20  import com.synchrona.util.Log;
21  import java.util.Hashtable;
22  
23  class DiscoveryLog {
24    Hashtable m_hash = new Hashtable();
25    Log       m_log  = null;
26  
27    public DiscoveryLog(Log log) {
28      m_hash = new Hashtable();
29      m_log  = log;
30    }  
31  
32    public void add(DiscoveryInformation info) {
33      m_log.debug("DiscoveryLog", "adding this: " + info);
34      m_hash.put(new Integer(info.getAddress()), info);  
35    }
36  
37    public DiscoveryInformation get(int remote) {
38      DiscoveryInformation info = (DiscoveryInformation) m_hash.get(new Integer(remote));
39      m_log.debug("DiscoveryLog", "adding this: " + info);
40      return info;
41    }
42  }