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

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

HIGHLIGHTS:

  • add SimultorProviders? hierarchy
  • start Framsticks server over SSH
  • FJF compatible with Framsticks 4.0rc3
  • reading and writing of standard.expt
  • a proof-of-concept implementation of StandardExperiment?

CHANGELOG:
Optionally return FreeAccess? from registry.

Add SimulatorRange?.

StandardExperiment? with genotypes circulation.

Automate registration around StandardState?.

More improvements to StandardExperiment?.

Skeleton version of StandardExperiment?.

Test saving of StandardState?.

Standard experiment state is being loaded.

More development towards StandardState? reading.

Work on reading standard experiment state.

Add classes for standard experiment.

Update example standard.expt

Add FreeAccess? and FreeObject?.

Made compatible with version 4.0rc3

Change deserialization policy.

Improve SSH support.

Working running simulator over SSH.

Fix joining bug in Experiment.

Working version of SimulatorRunner?.

Add more SimulatorProviders?.

Working PrimeExperimentTest? with 4.0rc3

Add references to deserialization.

Add OpaqueObject? and it's serialization.

Add deserialization of dictionaries.

Partial implementation of deserialization.

Add more tests for deserialization.

Prepare tests for deserialization.

Add proper result to prime experiment test.

Minor fixes to simulators providers.

Draft version of SimulatorProvider?.

Add SimulatorProvider? interface.

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                setCommand("frams.linux");
23                setPath("opt/framsticks");
24                setName("frams");
25        }
26
27
28        /**
29         * @return the port
30         */
31        @ParamAnnotation(flags = ParamFlags.USERREADONLY)
32        public Integer getPort() {
33                return port;
34        }
35
36        /**
37         * @param port the port to set
38         */
39        @ParamAnnotation
40        public void setPort(Integer port) {
41                this.port = port;
42        }
43
44        /**
45         * @return the path
46         */
47        @ParamAnnotation(flags = ParamFlags.USERREADONLY)
48        public String getPath() {
49                return path;
50        }
51
52        /**
53         * @param path the path to set
54         */
55        @ParamAnnotation
56        public void setPath(String path) {
57                this.path = path;
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.