source: java/main/src/main/java/com/framsticks/running/FramsServer.java @ 102

Last change on this file since 102 was 102, checked in by psniegowski, 11 years ago

HIGHLIGHTS:

for Joinables running

CHANGELOG:
Add WorkPackageLogic? and classes representing prime experiment state.

Add classes for PrimeExperiment? state.

Extract single netload routine in Simulator.

Working netload with dummy content in PrimeExperiment?.

More development with NetLoadSaveLogic? and PrimeExperiment?.

Improvement around prime.

Improve BufferedDispatcher?.isActive logic.

Add prime-all.xml configuration.

Manual connecting to existing simulators from GUI.

Guard in SimulatorConnector? against expdef mismatch.

Guard against empty target dispatcher in BufferedDispatcher?.

Make BufferedDispatcher? a Dispatcher (and Joinable).

Minor improvements.

Done StackedJoinable?, improve Experiment.

Develop StackedJoinable?.

Add StackedJoinable? utility joinables controller.

Add dependency on apache-commons-lang.

Add ready ListChange? on Simulators.

Improve hints in ListChange?.

Several improvements.

Found bug with dispatching in Experiment.

Minor improvements.

Fix bug with early finishing Server.

Many changes in Dispatching.

Fix bug with connection.

Do not obfuscate log with socket related exceptions.

Add SocketClosedException?.

Add SimulatorConnector?.

Work out conception of experiment composing of logics building blocks.

Rename SinkInterface? to Sink.

Move saving of Accesses into AccessOperations?.

Some improvements to Experiment.

Improve joinables.

Fix issue with joinables closing.

Add direct and managed consoles to popup menu.

File size: 1.6 KB
Line 
1package com.framsticks.running;
2
3
4
5import com.framsticks.params.ParamFlags;
6import com.framsticks.params.annotations.FramsClassAnnotation;
7import com.framsticks.params.annotations.ParamAnnotation;
8import com.framsticks.util.lang.Strings;
9
10@FramsClassAnnotation
11public class FramsServer extends ExternalProcess {
12
13        protected Integer port;
14        protected String path;
15        protected String expdef;
16
17        /**
18         *
19         */
20        public FramsServer() {
21                super();
22                setPath(System.getProperties().get("user.home") + "/opt/framsticks");
23                setName("frams");
24        }
25
26
27        /**
28         * @return the port
29         */
30        @ParamAnnotation(flags = ParamFlags.USERREADONLY)
31        public Integer getPort() {
32                return port;
33        }
34
35        /**
36         * @param port the port to set
37         */
38        @ParamAnnotation
39        public void setPort(Integer port) {
40                this.port = port;
41        }
42
43        /**
44         * @return the path
45         */
46        @ParamAnnotation(flags = ParamFlags.USERREADONLY)
47        public String getPath() {
48                return path;
49        }
50
51        /**
52         * @param path the path to set
53         */
54        @ParamAnnotation
55        public void setPath(String path) {
56                this.path = path;
57                setCommand(path + "/frams.linux");
58                setDirectory(path);
59        }
60
61        /**
62         * @return the expdef
63         */
64        @ParamAnnotation(flags = ParamFlags.USERREADONLY)
65        public String getExpdef() {
66                return expdef;
67        }
68
69        /**
70         * @param expdef the expdef to set
71         */
72        @ParamAnnotation
73        public void setExpdef(String expdef) {
74                this.expdef = expdef;
75        }
76
77        @Override
78        protected void joinableStart() {
79                if (port != null) {
80                        arguments.add("-n");
81                        arguments.add("-p" + port);
82                }
83                if (Strings.notEmpty(expdef)) {
84                        arguments.add("Simulator.expdef=\"" + expdef + "\";");
85                }
86                // log.debug("running {} with arguments {}", getCommand(), arguments);
87                super.joinableStart();
88        }
89
90}
Note: See TracBrowser for help on using the repository browser.