Ignore:
Timestamp:
09/10/13 21:11:41 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • import refactorization: move Tree, Path, etc.

from core to structure package

  • initial serialization implementation
  • improve PrimeExperiment? test
  • many organizational changes and convenience improvements

CHANGELOG:
Make registry in AbstractTree? final.

Move most classes from core to structure package.

Minor changes.

Switch names of Future and FutureHandler?.

Rename ExceptionResultHandler? to ExceptionHandler?.

Rename ExceptionHandler? to ExceptionDispatcherHandler?.

Fix bug in ParamCandidate? cache.

Add missing synchronization to the BufferedDispatcher?.

Develop @Serialized support.

Rework serialization further.

Add serialization/deserialization interface to ValueParam?.

Move getStorageType and isNumeric from Param down to params hierarchy.

Minor changes.

Improve param type induction.

Add TestSerializedClass? for testing new serialization.

Add info files gor GenePool? and Population.

Add standard.expt exemplary netfile.

Add type name field to PropertiesObject?.

Use PropertiesObject? for PropertiesAccess? instead of ordinary map.

Hide getFramsClass is several more places.

More unification accross FramsClass?, Access and Path.

Add ParamCollection?.

Simplify interface for getting params from FramsClass?, Access
or Path.

Make Access.call() interface variadic.

Add arguments(args) convenience wrapper around new Object[] {args}.

Upgrade to apache.commons.lang version 3.1

Minor improvement with Response constructors.

Develop proper result printing in ClientAtServer?.

Add experimentNetsave to PrimeExperiment?.

File:
1 edited

Legend:

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

    r99 r105  
    11package com.framsticks.util.dispatching;
    22
     3import com.framsticks.util.ExceptionHandler;
    34import com.framsticks.util.FramsticksException;
    45
    5 public abstract class FutureHandler<T> extends Future<T> {
     6/**
     7 * @author Piotr Sniegowski
     8 */
     9public abstract class FutureHandler<T> implements ExceptionHandler {
    610
    7         protected final ExceptionResultHandler handler;
     11        protected abstract void result(T result);
    812
    9         public FutureHandler(ExceptionResultHandler handler) {
    10                 assert handler != null;
    11                 this.handler = handler;
     13        public final void pass(T result) {
     14                try {
     15                        result(result);
     16                } catch (FramsticksException e) {
     17                        handle(e);
     18                }
    1219        }
    13 
    14         @Override
    15         public final void handle(FramsticksException exception) {
    16                 handler.handle(exception);
    17         }
    18 
    19         public static <T> FutureHandler<T> doNothing(Class<T> type, ExceptionResultHandler handler) {
    20                 return new FutureHandler<T>(handler) {
    21 
    22                         @Override
    23                         protected void result(T result) {
    24 
    25                         }
    26                 };
    27         }
    28 
    2920}
Note: See TracChangeset for help on using the changeset viewer.