KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ve > luz > ica > jackass > daemon > SingleHostApplicationManager


1 /*
2  * Copyright (c) 2003 by The Jackass Team
3  * Licensed under the Open Software License version 2.0
4  */

5 package ve.luz.ica.jackass.daemon;
6
7 import java.util.Map JavaDoc;
8 import java.util.HashMap JavaDoc;
9
10 /**
11  * An implementation of the ApplicationManager interface.
12  * This class stores ApplicationInfo objects using the application name as key.
13  * @author Carlos Arévalo
14  */

15 public final class SingleHostApplicationManager implements ApplicationManager
16 {
17     private Map JavaDoc appMap = new HashMap JavaDoc();
18
19     /**
20      * Class constructor
21      */

22     public SingleHostApplicationManager()
23     {
24     }
25
26     /**
27      * @see ve.luz.ica.jackass.daemon.ApplicationManager#get(java.lang.String)
28      */

29     public ApplicationInfo get(String JavaDoc appName)
30     {
31         return (ApplicationInfo) appMap.get(appName);
32     }
33
34     /**
35      * @see ve.luz.ica.jackass.daemon.ApplicationManager#put(String, ApplicationInfo)
36      */

37     public void put(String JavaDoc appName, ApplicationInfo appInfo)
38     {
39         appMap.put(appName, appInfo);
40     }
41
42     /**
43      * @see ve.luz.ica.jackass.daemon.ApplicationManager#remove(java.lang.String)
44      */

45     public void remove(String JavaDoc appName)
46     {
47         appMap.remove(appName);
48     }
49 }
50
Popular Tags