source: java/main/src/main/java/com/framsticks/hosting/CliEvent.java @ 105

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

HIGHLIGHTS:

  • import refactorization: move Tree, Path, etc.

from core to structure package

  • initial serialization implementation
  • improve PrimeExperiment? test
  • many organizational changes and convenience improvements

CHANGELOG:
Make registry in AbstractTree? final.

Move most classes from core to structure package.

Minor changes.

Switch names of Future and FutureHandler?.

Rename ExceptionResultHandler? to ExceptionHandler?.

Rename ExceptionHandler? to ExceptionDispatcherHandler?.

Fix bug in ParamCandidate? cache.

Add missing synchronization to the BufferedDispatcher?.

Develop @Serialized support.

Rework serialization further.

Add serialization/deserialization interface to ValueParam?.

Move getStorageType and isNumeric from Param down to params hierarchy.

Minor changes.

Improve param type induction.

Add TestSerializedClass? for testing new serialization.

Add info files gor GenePool? and Population.

Add standard.expt exemplary netfile.

Add type name field to PropertiesObject?.

Use PropertiesObject? for PropertiesAccess? instead of ordinary map.

Hide getFramsClass is several more places.

More unification accross FramsClass?, Access and Path.

Add ParamCollection?.

Simplify interface for getting params from FramsClass?, Access
or Path.

Make Access.call() interface variadic.

Add arguments(args) convenience wrapper around new Object[] {args}.

Upgrade to apache.commons.lang version 3.1

Minor improvement with Response constructors.

Develop proper result printing in ClientAtServer?.

Add experimentNetsave to PrimeExperiment?.

File size: 1.3 KB
Line 
1package com.framsticks.hosting;
2
3import com.framsticks.params.EventListener;
4import com.framsticks.params.annotations.FramsClassAnnotation;
5import com.framsticks.params.annotations.ParamAnnotation;
6import com.framsticks.params.types.EventParam;
7import com.framsticks.params.types.ProcedureParam;
8import com.framsticks.structure.Path;
9import com.framsticks.util.dispatching.Future;
10import com.framsticks.util.dispatching.ThrowExceptionHandler;
11
12@FramsClassAnnotation
13public class CliEvent {
14
15        protected Cli cli;
16        protected String id;
17
18        protected Path path;
19        protected EventParam param;
20
21        protected String name;
22        protected String pathToEvent;
23
24        protected EventListener<Object> listener;
25
26        public CliEvent() {
27        }
28
29        @ParamAnnotation(paramType = ProcedureParam.class)
30        public void remove() {
31                assert path.getTree().isActive();
32
33                //it should happen now
34                path.getTree().removeListener(path, param, listener, Future.doNothing(Void.class, ThrowExceptionHandler.getInstance()));
35                cli.events.remove(id);
36        }
37
38        /**
39         * @return the id
40         */
41        @ParamAnnotation
42        public String getId() {
43                return id;
44        }
45
46        @ParamAnnotation
47        public String getUid() {
48                return id;
49        }
50
51        @ParamAnnotation
52        public String getName() {
53                return name;
54        }
55
56        @Override
57        public String toString() {
58                return "event " + id + " of type " + param + " in " + path;
59        }
60
61}
Note: See TracBrowser for help on using the repository browser.