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