Ignore:
Timestamp:
07/06/13 03:51:11 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • add proper exception passing between communication sides:

if exception occur during handling client request, it is
automatically passed as comment to error response.

it may be used to snoop communication between peers

  • fix algorithm choosing text controls in GUI
  • allow GUI testing in virtual frame buffer (xvfb)

FEST had some problem with xvfb but workaround was found

supports tab-completion based on requests history

CHANGELOG:
Further improve handling of exceptions in GUI.

Add StatusBar? implementing ExceptionResultHandler?.

Make completion processing asynchronous.

Minor changes.

Improve completion in console.

Improve history in InteractiveConsole?.

First working version of DirectConsole?.

Minor changes.

Make Connection.address non final.

It is more suitable to use in configuration.

Improvement of consoles.

Improve PopupMenu? and closing of FrameJoinable?.

Fix BrowserTest?.

Found bug with FEST running under xvfb.

JButtonFixture.click() is not working under xvfb.
GuiTest? has wrapper which uses JButton.doClick() directly.

Store CompositeParam? param in TreeNode?.

Simplify ClientSideManagedConnection? connecting.

There is now connectedFunctor needed, ApplicationRequests? can be
send right after creation. They are buffered until the version
and features are negotiated.

Narow down interface of ClientSideManagedConnection?.

Allow that connection specialization send only
ApplicationRequests?.

Improve policy of text control choosing.

Change name of Genotype in BrowserTest?.

Make BrowserTest? change name of Genotype.

Minor change.

First working draft of TrackConsole?.

Simplify Consoles.

More improvements with gui joinables.

Unify initialization on gui joinables.

More rework of Frame based entities.

Refactorize structure of JFrames based entities.

Extract GuiTest? from BrowserBaseTest?.

Reorganize Console classes structure.

Add Collection view to JoinableCollection?.

Configure timeout in testing.

Minor changes.

Rework connections hierarchy.

Add Mode to the get operation.

Make get and set in Tree take PrimitiveParam?.

Unify naming of operations.

Make RunAt? use the given ExceptionHandler?.

It wraps the virtual runAt() method call with
try-catch passing exception to handler.

Force RunAt? to include ExceptionHandler?.

Improve ClientAtServer?.

Minor change.

Another sweep with FindBugs?.

Rename Instance to Tree.

Minor changes.

Minor changes.

Further clarify semantics of Futures.

Add FutureHandler?.

FutureHandler? is refinement of Future, that proxifies
exception handling to ExceptionResultHandler? given
at construction time.

Remove StateFunctor? (use Future<Void> instead).

Make Connection use Future<Void>.

Unparametrize *ResponseFuture?.

Remove StateCallback? not needed anymore.

Distinguish between sides of ResponseFuture?.

Base ResponseCallback? on Future (now ResponseFuture?).

Make asynchronous store taking Future for flags.

Implement storeValue in ObjectInstance?.

Location:
java/main/src/main/java/com/framsticks/dumping
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/dumping/LoadStream.java

    r96 r97  
    22
    33import com.framsticks.communication.File;
    4 import com.framsticks.core.InstanceUtils;
     4import com.framsticks.core.TreeOperations;
    55import com.framsticks.core.Path;
    66import com.framsticks.params.ListSource;
    7 import com.framsticks.core.Instance;
     7import com.framsticks.core.Tree;
    88import com.framsticks.util.*;
    99import com.framsticks.util.dispatching.Future;
     
    2424        private final static Logger log = Logger.getLogger(LoadStream.class.getName());
    2525
    26         protected final Instance instance;
     26        protected final Tree tree;
    2727        protected final Path mountPath;
    2828        protected final BufferedReader stream;
     
    3131
    3232
    33         public LoadStream(Path mountPath, BufferedReader stream, Instance instance, Future<Path> future) {
    34                 this.instance = instance;
     33        public LoadStream(Path mountPath, BufferedReader stream, Tree tree, Future<Path> future) {
     34                this.tree = tree;
    3535                this.mountPath = mountPath;
    3636                this.stream = stream;
     
    5959                                        if (line.equals("ok")) {
    6060                                                if (query.first.equals("get")) {
    61                                                         Path path = InstanceUtils.createIfNeeded(instance, query.second);
    62                                                         InstanceUtils.processFetchedValues(path, files);
     61                                                        Path path = TreeOperations.createIfNeeded(tree, query.second);
     62                                                        TreeOperations.processFetchedValues(path, files);
    6363                                                } else if (query.first.equals("info")) {
    6464                                                        assert files.size() == 1;
    65                                                         InstanceUtils.processFetchedInfo(instance, files.get(0));
     65                                                        TreeOperations.processFetchedInfo(tree, files.get(0));
    6666                                                } else {
    6767                                                        assert false;
     
    8787                }
    8888                log.info("loaded in: " + stopwatch);
    89                 future.pass(Path.to(instance, mountPath.getTextual()));
     89                future.pass(Path.to(tree, mountPath.getTextual()));
    9090        }
    9191
  • java/main/src/main/java/com/framsticks/dumping/SaveStream.java

    r96 r97  
    11package com.framsticks.dumping;
    22
    3 import static com.framsticks.core.InstanceUtils.*;
     3import static com.framsticks.core.TreeOperations.*;
    44import com.framsticks.core.Node;
    55import com.framsticks.core.Path;
     
    1010import com.framsticks.params.SinkInterface;
    1111import com.framsticks.parsers.Savers;
    12 import com.framsticks.core.Instance;
     12import com.framsticks.core.Tree;
    1313import com.framsticks.util.*;
    1414import com.framsticks.util.dispatching.Dispatching;
     15import com.framsticks.util.dispatching.Future;
     16import com.framsticks.util.dispatching.ThrowExceptionHandler;
     17
    1518import org.apache.log4j.Logger;
    1619import com.framsticks.util.dispatching.RunAt;
     
    2831
    2932        protected final SinkInterface sink;
    30         protected final Instance instance;
    31         protected final StateFunctor stateFunctor;
     33        protected final Tree tree;
     34        protected final Future<Void> future;
    3235        protected final Stopwatch stopwatch = new Stopwatch();
    3336        protected final Set<FramsClass> storedInfo = new HashSet<FramsClass>();
     
    3538        private int dispatched = 0;
    3639
    37         public SaveStream(SinkInterface sink, Instance instance, Path root, StateFunctor stateFunctor) {
     40        public SaveStream(SinkInterface sink, Tree tree, Path root, Future<Void> future) {
    3841                assert Dispatching.isThreadSafe();
    3942                this.sink = sink;
    40                 this.instance = instance;
    41                 this.stateFunctor = stateFunctor;
     43                this.tree = tree;
     44                this.future = future;
    4245                dispatchWrite(root);
    4346        }
     
    4548        protected void dispatchWrite(final Path path) {
    4649                ++dispatched;
    47                 instance.dispatch(new RunAt<Instance>() {
     50                //TODO TEH
     51                tree.dispatch(new RunAt<Tree>(ThrowExceptionHandler.getInstance()) {
    4852                        @Override
    49                         public void run() {
     53                        protected void runAt() {
    5054                                write(path);
    5155                        }
     
    5458
    5559        protected void finished() {
    56                 assert instance.isActive();
     60                assert tree.isActive();
    5761                log.info("stored in " + stopwatch);
    58                 stateFunctor.call();
     62                future.pass(null);
    5963        }
    6064
    6165        public void write(final Path path) {
    62                 assert instance.isActive();
     66                assert tree.isActive();
    6367                if (!path.isResolved()) {
    6468                        log.debug("path " + path + " is not resolved - skipping");
Note: See TracChangeset for help on using the changeset viewer.