Package net.sf.cuf.xfer

The data transfer ("xfer") library is the base for a synchronos or asynchronos access of the business core.

See: Description

Package net.sf.cuf.xfer Description

The data transfer ("xfer") library is the base for a synchronos or asynchronos access of the business core.

Each access towards the business core functionality (regardless if that code is executed locally or remote) is wrapped in a request object (see Request), each request returns a result (see Response).
The result is either valid (then getResult() will return the result object) or not valid (then getError() will return the error object).
This simple but rigid "one request either returns an error or a valid result" abstraction has proven it's usefulness in various projects.
The request object gets executed by one of the methods of an implementation of the Dispatch interface. The execution is either synchronous or asynchronous, and one variant dispatches the result in the Swing EDT (Event Dispatch Thread) or the application thread if JavaFX is used.
An other valuable capability provided by the xfer library is the easy integration of mock-up code for testing:
If the Java property class name.delegate is set and references a class that implements the RequestDelegate interface, this implementation is used to generate the response instead the method coded in the request object.

Copyright © 2014 Jürgen Zeller (privat). All rights reserved.