[105] | 1 | package com.framsticks.structure; |
---|
| 2 | |
---|
| 3 | import javax.annotation.Nonnull; |
---|
| 4 | |
---|
| 5 | import com.framsticks.communication.queries.NeedFileAcceptor; |
---|
| 6 | import com.framsticks.params.Access; |
---|
| 7 | import com.framsticks.params.CompositeParam; |
---|
| 8 | import com.framsticks.params.EventListener; |
---|
| 9 | import com.framsticks.params.FramsClass; |
---|
| 10 | import com.framsticks.params.PrimitiveParam; |
---|
| 11 | import com.framsticks.params.Registry; |
---|
| 12 | import com.framsticks.params.types.EventParam; |
---|
| 13 | import com.framsticks.params.types.ProcedureParam; |
---|
| 14 | import com.framsticks.util.ExceptionHandler; |
---|
| 15 | import com.framsticks.util.dispatching.Dispatcher; |
---|
| 16 | import com.framsticks.util.dispatching.DispatcherSetable; |
---|
| 17 | import com.framsticks.util.dispatching.FutureHandler; |
---|
| 18 | import com.framsticks.util.dispatching.Joinable; |
---|
| 19 | |
---|
| 20 | public 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 | } |
---|