/[xulu]/trunk.bakup/src/appl/parallel/starter/client/StarterContainer.java
ViewVC logotype

Annotation of /trunk.bakup/src/appl/parallel/starter/client/StarterContainer.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 77 - (hide annotations)
Wed Feb 10 16:14:27 2010 UTC (14 years, 10 months ago) by alfonx
File size: 1040 byte(s)
backup of trunk
1 mojays 2 package appl.parallel.starter.client;
2    
3     import java.rmi.RemoteException;
4    
5     import appl.parallel.starter.Starter;
6    
7     /**
8     * Just a small container class used e.g. in the
9     * {@link XuluStarterControllerFrame} for display
10     *
11     * @author Dominik Appl
12     */
13     public class StarterContainer {
14     private final Starter starter;
15    
16     private boolean isRunning;
17    
18     private final String hostInfo;
19    
20     /**
21     * A Container for use in SwingComponents. The status ({@link #isServerRunning()}
22     * is only the status at the creation of the object!
23     *
24     * @param starter
25     * The encapsulated Starter
26     * @param hostInfo
27     */
28     public StarterContainer(Starter starter, String hostInfo) {
29     this.starter = starter;
30     this.hostInfo = hostInfo;
31     try {
32     isRunning = starter.isRunning();
33     } catch (RemoteException e) {
34     isRunning = false;
35     }
36     }
37    
38     public boolean isServerRunning() {
39     return isRunning;
40     }
41    
42     public Starter getStarter() {
43     return starter;
44     }
45    
46     public String toString() {
47     return hostInfo;
48     }
49     }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26