Ignore:
Timestamp:
07/04/13 20:29:50 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • cleanup Instance management
    • extract Instance interface
    • extract Instance common algorithms to InstanceUtils?
  • fix closing issues: Ctrl+C or window close button

properly shutdown whole program

by Java Framsticks framework

  • fix parsing and printing of all request types
  • hide exception passing in special handle method of closures
    • substantially improve readability of closures
    • basically enable use of exception in asynchronous closures

(thrown exception is transported back to the caller)

  • implement call request on both sides

CHANGELOG:
Further improve calling.

Improve instance calling.

Calling is working on both sides.

Improve exception handling in testing.

Waiters do not supercede other apllication exception being thrown.

Finished parsing and printing of all request types (with tests).

Move implementation and tests of request parsing to Request.

Add tests for Requests.

Improve waits in asynchronours tests.

Extract more algorithms to InstanceUtils?.

Extract Instance.resolve to InstanceUtils?.

Improve naming.

Improve passing exception in InstanceClient?.

Hide calling of passed functor in StateCallback?.

Hide Exception passing in asynchronous closures.

Hide exception passing in Future.

Make ResponseCallback? an abstract class.

Make Future an abstract class.

Minor change.

Move getPath to Path.to()

Move bindAccess to InstanceUtils?.

Extract common things to InstanceUtils?.

Fix synchronization bug in Connection.

Move resolve to InstanceUtils?.

Allow names of Joinable to be dynamic.

Add support for set request server side.

More fixes in communication.

Fix issues with parsing in connection.

Cut new line characters when reading.

More improvements.

Migrate closures to FramsticksException?.

Several changes.

Extract resolveAndFetch to InstanceUtils? algorithms.

Test resolving and fetching.

More fixes with function signature deduction.

Do not print default values in SimpleAbstractAccess?.

Add test of FramsClass? printing.

Improve FramsticksException? messages.

Add explicit dispatcher synchronization feature.

Rework assertions in tests.

Previous solution was not generic enough.

Allow addition of joinables to collection after start.

Extract SimulatorInstance? from RemoteInstance?.

Remove PrivateJoinableCollection?.

Improve connections.

Move shutdown hook to inside the Monitor.

It should work in TestNG tests, but it seems that
hooks are not called.

In ServerTest? client connects to testing server.

Move socket initialization to receiver thread.

Add proper closing on Ctrl+C (don't use signals).

Fix bugs with server accepting connections.

Merge Entity into Joinable.

Reworking ServerInstance?.

Extract more algorithm to InstanceUtils?.

Extract some common functionality from AbstractInstance?.

Functions were placed in InstanceUtils?.

Hide registry of Instance.

Use ValueParam? in Instance interface.

Minor change.

Extract Instance interface.

Old Instance is now AbstractInstance?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/gui/Browser.java

    r90 r96  
    55import com.framsticks.params.annotations.FramsClassAnnotation;
    66import com.framsticks.params.annotations.ParamAnnotation;
    7 import com.framsticks.util.Logging;
    87import com.framsticks.util.dispatching.AbstractJoinable;
    98import com.framsticks.util.dispatching.Dispatcher;
     
    2221import java.util.ArrayList;
    2322import java.util.List;
    24 import java.util.Map;
    2523import com.framsticks.util.dispatching.RunAt;
    2624
     
    2927 */
    3028@FramsClassAnnotation
    31 public class Browser extends AbstractJoinable implements Dispatcher<Browser>, Entity, JoinableParent {
     29public class Browser extends AbstractJoinable implements Dispatcher<Browser>, JoinableParent {
    3230
    3331        private static final Logger log = Logger.getLogger(Browser.class.getName());
     
    7270                        @Override
    7371                        public void run() {
    74                                 i.resolveAndFetch(path, new Future<Path>() {
     72                                InstanceUtils.resolveAndFetch(i, path, new Future<Path>(future) {
    7573                                        @Override
    76                                         public void result(final Path p, Exception e) {
    77                                                 Logging.log(log, "auto resolve path", path, e);
    78                                                 if (future != null) {
    79                                                         future.result(p, e);
    80                                                 }
    81                                                 if (e == null) {
    82                                                         mainFrame.dispatch(new RunAt<Frame>() {
    83                                                                 @Override
    84                                                                 public void run() {
    85                                                                         mainFrame.goTo(p);
    86                                                                 }
    87                                                         });
    88                                                 }
     74                                        protected void result(final Path p) {
     75                                                future.pass(p);
     76                                                mainFrame.dispatch(new RunAt<Frame>() {
     77                                                        @Override
     78                                                        public void run() {
     79                                                                mainFrame.goTo(p);
     80                                                        }
     81                                                });
    8982                                        }
    9083                                });
     
    132125                                @Override
    133126                                public void run() {
    134                                         final Path p = i.getRootPath();
     127                                        final Path p = Path.to(i, "/");
    135128                                        dispatch(new RunAt<Browser>() {
    136129                                                @Override
     
    194187         * @return the instances
    195188         */
    196         public Map<String, Instance> getInstances() {
    197                 return instances.getObservables();
     189        public JoinableCollection<Instance> getInstances() {
     190                return instances;
    198191        }
    199192
     
    254247        @Override
    255248        protected void joinableFinish() {
    256                 // TODO Auto-generated method stub
    257249
    258250        }
Note: See TracChangeset for help on using the changeset viewer.