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

Contents of /trunk/src/appl/parallel/starter/client/StarterContainer.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations)
Wed Feb 25 11:54:01 2009 UTC (15 years, 9 months ago) by mojays
File size: 1040 byte(s)
First Commit, corresponds to Revision 1008 of Wikisquare-SVN 
1 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