Ignore:
Timestamp:
06/30/13 12:48:20 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • loading f0 schema with XmlLoader?
  • use XmlLoader? to load configuration
  • introduce unified fork-join model of various entities

(Instances, Connections, GUI Frames, etc.),
all those entities clean up gracefully on
shutdown, which may be initialized by user
or by some entity

  • basing on above, simplify several organizing classes

(Observer, main class)

(to host native frams server process from Java level)

CHANGELOG:
Remove redundant Observer class.

Clean up in AbstractJoinable?.

Update ExternalProcess? class to changes in joining model.

Another sweep through code with FindBugs?.

Find bug with not joining RemoteInstance?.

Joining almost works.

Much improved joining model.

More improvement to joining model.

Add logging messages around joinable operations.

Rename methods in AbstractJoinable?.

Improve Joinable.

Rewrite of entity structure.

More simplifications with entities.

Further improve joinables.

Let Frame compose from JFrame instead of inheriting.

Add join classes.

Improvements of closing.

Add Builder interface.

Add FramsServerTest?.xml

FramsServer? may be configured through xml.

Make Framsticks main class an Observer of Entities.

Make Observer a generic type.

Remove variables regarding to removed endpoint.

Simplify observer (remove endpoints).

More changes to Observer and Endpoint.

Minor improvements.

Add OutputListener? to ExternalProcess?.

Improve testing of ExternalProcess?.

Add ExternalProcess? runner.

Rename the Program class to Framsticks.

Migrate Program to use XmlLoader? configuration.

First steps with configuration using XmlLoader?.

Fix several bugs.

Move all f0 classes to apriopriate package.

XmlLoader? is able to load Schema.

XmlLoader? is loading classes and props.

Add GroupBuilder?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/hosting/InstanceClient.java

    r85 r88  
    1010import com.framsticks.parsers.Savers;
    1111import com.framsticks.core.LocalInstance;
     12import com.framsticks.util.dispatching.AbstractJoinable;
     13import com.framsticks.util.dispatching.Dispatching;
    1214import com.framsticks.util.dispatching.Future;
     15import com.framsticks.util.dispatching.Joinable;
     16import com.framsticks.util.dispatching.JoinableParent;
     17import com.framsticks.util.dispatching.JoinableState;
    1318
    1419import java.net.Socket;
     
    2126 * @author Piotr Sniegowski
    2227 */
    23 public class InstanceClient implements RequestHandler {
     28public class InstanceClient extends AbstractJoinable implements RequestHandler, JoinableParent {
    2429
    2530        protected final LocalInstance instance;
     
    2934                this.instance = instance;
    3035                connection = new ServerConnection(socket, this);
    31                 connection.start();
    3236        }
    3337
     
    3640                return instance + "|" + connection.toString();
    3741        }
    38 
    3942
    4043        @Override
     
    9497
    9598        }
     99
     100        @Override
     101        protected void joinableStart() {
     102                Dispatching.use(connection, this);
     103        }
     104
     105        @Override
     106        protected void joinableInterrupt() {
     107                Dispatching.drop(connection, this);
     108        }
     109
     110        @Override
     111        protected void joinableFinish() {
     112        }
     113
     114        @Override
     115        protected void joinableJoin() throws InterruptedException {
     116                Dispatching.join(connection);
     117        }
     118
     119        @Override
     120        public void childChangedState(Joinable joinable, JoinableState state) {
     121                proceedToState(state);
     122        }
     123
    96124}
Note: See TracChangeset for help on using the changeset viewer.