source: java/main/src/main/java/com/framsticks/structure/Tree.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: 2.6 KB
Line 
1package com.framsticks.structure;
2
3import javax.annotation.Nonnull;
4
5import com.framsticks.communication.queries.NeedFileAcceptor;
6import com.framsticks.params.Access;
7import com.framsticks.params.CompositeParam;
8import com.framsticks.params.EventListener;
9import com.framsticks.params.FramsClass;
10import com.framsticks.params.PrimitiveParam;
11import com.framsticks.params.Registry;
12import com.framsticks.params.types.EventParam;
13import com.framsticks.params.types.ProcedureParam;
14import com.framsticks.util.ExceptionHandler;
15import com.framsticks.util.dispatching.Dispatcher;
16import com.framsticks.util.dispatching.DispatcherSetable;
17import com.framsticks.util.dispatching.FutureHandler;
18import com.framsticks.util.dispatching.Joinable;
19
20public interface Tree extends Dispatcher<Tree>, DispatcherSetable<Tree>, Joinable, ExceptionHandler {
21
22        public @Nonnull Node getAssignedRoot();
23        public void assignRootParam(CompositeParam param);
24        public void assignRootObject(Object object);
25
26        public @Nonnull Access prepareAccess(CompositeParam param);
27        public void takeAllFrom(Registry source);
28
29        public FramsClass getInfoFromCache(String id);
30
31        public void putInfoIntoCache(FramsClass framclass);
32
33        // /**
34        //  *
35        //  * Functions accepts ValueParam, because it is also possible to get number of List elements.
36        //  *
37        //  */
38        // public void get(Path path, ValueParam param, Future<Object> future);
39
40        public void get(Path path, FutureHandler<Path> future);
41
42        public <R> void call(Path path, ProcedureParam param, Object[] arguments, Class<R> resultType, FutureHandler<R> future);
43
44        /**
45         *
46         * Functions accepts PrimitiveParam<?>, because it is not possible to set number of List elements.
47         *
48         */
49        public void set(Path path, PrimitiveParam<?> param, Object value, FutureHandler<Integer> future);
50
51        public void info(Path path, FutureHandler<FramsClass> future);
52
53        public void setExceptionHandler(ExceptionHandler handler);
54
55        public ExceptionHandler getExceptionHandler();
56
57        // public void setDispatcher(Dispatcher<Tree> dispatcher);
58
59        // public Dispatcher<Tree> getDispatcher();
60
61        public <A> void addListener(Path path, EventParam param, EventListener<A> listener, Class<A> argumentType, FutureHandler<Void> future);
62
63        public void removeListener(Path path, EventParam param, EventListener<?> listener, FutureHandler<Void> future);
64
65        public Registry getRegistry();
66
67        public <T> void putSideNote(Object object, SideNoteKey<T> key, T value);
68
69        public <T> T getSideNote(Object object, SideNoteKey<T> key);
70
71        public boolean removeSideNote(Object object, SideNoteKey<?> key);
72
73        public void addNeedFileAcceptor(int priority, NeedFileAcceptor acceptor);
74
75        public void removeNeedFileAcceptor(NeedFileAcceptor acceptor);
76
77}
Note: See TracBrowser for help on using the repository browser.