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?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/util/dispatching/Dispatching.java

    r96 r97  
    44
    55import com.framsticks.util.FramsticksException;
    6 import com.framsticks.util.StateFunctor;
    76
    87/**
     
    1817        public static <C> void dispatchIfNotActive(Dispatcher<C> dispatcher, RunAt<? extends C> runnable) {
    1918                if (dispatcher.isActive()) {
    20                         runnable.run();
     19                        runnable.runAt();
    2120                        return;
    2221                }
    2322                dispatcher.dispatch(runnable);
    24         }
    25 
    26         //TODO RunAt StateFunctor
    27         public static <C> void dispatchOk(Dispatcher<C> dispatcher, final StateFunctor stateFunctor) {
    28                 dispatcher.dispatch(new RunAt<C>() {
    29                         @Override
    30                         public void run() {
    31                                 stateFunctor.call();
    32                         }
    33                 });
    3423        }
    3524
     
    4029
    4130        public static <P, C> void invokeDispatch(Dispatcher<P> dispatcher, final Dispatcher<C> finalDispatcher, final RunAt<C> runnable) {
    42                 dispatcher.dispatch(new RunAt<P>() {
     31                dispatcher.dispatch(new RunAt<P>(runnable) {
    4332                        @Override
    44                         public void run() {
     33                        protected void runAt() {
    4534                                finalDispatcher.dispatch(runnable);
    4635                        }
     
    4938
    5039        public static void sleep(double seconds) {
     40                log.debug("sleeping");
    5141                try {
    5242                        java.lang.Thread.sleep((long) (seconds * 1000));
     
    5444
    5545                }
     46                log.debug("slept");
    5647        }
    5748
     
    6253                        return;
    6354                }
    64                 runnable.run();
     55                runnable.runAt();
    6556        }
    6657
     
    9586
    9687        public static void childChangedState(final JoinableParent parent, final Joinable joinable, final JoinableState state) {
    97                 dispatcherGuardedInvoke(joinable, new RunAt<Object>() {
     88                dispatcherGuardedInvoke(joinable, new RunAt<Object>(ThrowExceptionHandler.getInstance()) {
    9889                        @Override
    99                         public void run() {
     90                        protected void runAt() {
    10091                                log.debug("joinable " + joinable + " is notifying parent " + parent + " about change to " + state);
    10192                                parent.childChangedState(joinable, state);
     
    140131                 */
    141132                public QueryRunner(Query<T> query) {
     133                        //TODO TEH
     134                        super(ThrowExceptionHandler.getInstance());
    142135                        this.query = query;
    143136                }
    144137
    145138                @Override
    146                 public void run() {
     139                protected void runAt() {
    147140                        result = query.get();
    148141                        synchronized (this) {
     
    206199        public static <C> void synchronize(Dispatcher<C> dispatcher, double seconds) {
    207200                final Waiter waiter = new Waiter(seconds);
    208                 dispatcher.dispatch(new RunAt<C>() {
     201                dispatcher.dispatch(new RunAt<C>(ThrowExceptionHandler.getInstance()) {
    209202                        @Override
    210                         public void run() {
     203                        protected void runAt() {
    211204                                waiter.pass();
    212205                        }
Note: See TracChangeset for help on using the changeset viewer.