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/dumping/FileInstance.java

    r85 r88  
    44import com.framsticks.core.Path;
    55import com.framsticks.core.Instance;
     6import com.framsticks.params.annotations.FramsClassAnnotation;
     7import com.framsticks.params.annotations.ParamAnnotation;
    68import com.framsticks.util.dispatching.Future;
    79import com.framsticks.util.io.Encoding;
    810
    9 import org.apache.commons.configuration.Configuration;
    1011import org.apache.log4j.Logger;
    1112
     
    1617import java.io.InputStreamReader;
    1718
     19import javax.annotation.OverridingMethodsMustInvokeSuper;
     20
    1821/**
    1922 * @author Piotr Sniegowski
    2023 */
     24@FramsClassAnnotation
    2125public class FileInstance extends LocalInstance {
    2226
     
    2731        }
    2832
    29         @Override
    30         public void configure(Configuration config) {
    31                 super.configure(config);
    32                 file = new File(config.getString("filename"));
     33        @ParamAnnotation
     34        public void setFilename(String filename) {
     35                file = new File(filename);
     36        }
     37
     38        @ParamAnnotation
     39        public String getFilename() {
     40                return file.getName();
    3341        }
    3442
    3543        @Override
    36         public void run() {
     44        @OverridingMethodsMustInvokeSuper
     45        protected void firstTask() {
    3746                assert isActive();
    38                 super.run();
     47                super.firstTask();
    3948                try {
    4049                        LoadStream stream = new LoadStream(this.getRootPath(), new BufferedReader(new InputStreamReader(new FileInputStream(file), Encoding.getFramsticksCharset())), this, new Future<Path>() {
Note: See TracChangeset for help on using the changeset viewer.