Dispatchable Event

This is the read me for Dispatchable Event distribution.

If you simply want to use the library, look in the lib directory for DispatchableEvent.jar for J2SE 5.0/JDK 1.5 users, or DispatchableEvent1.4.jar for JDK 1.4 users.

JavaDoc for both JDKs is also included.

Dependencies

The J2SE 5.0 version should work without any external dependencies.

The JDK 1.4 version requires the backport of java.util.concurrent to 1.4, which can be downloaded here:

Compiling

You can build, test and jar the library for yourself using the included source code and build.xml with ant 1.6.

Several options can be passed on the ant command line when building:

No options
Build for J2SE 5.0. Do not build J2ME component.
src.version=1.4
Build for JDK 1.4. Do not build J2ME component.
include.j2me
Enables building the J2ME component.

eg, to build for JDK 1.4:

ant -Dsrc.version=1.4

The J2SE 5.0 build uses the directories src, classes and doc. The J2SE 5.0 build uses the directories src1.4, classes1.4 and doc1.4.

Compile Dependencies:

By default build.xml expects to find the 3rd party JARs in ~/lib (where ~ is your home directory or local profile directory on Windows). The locations of all of the JAR files required to compile can be overidden using properties specified at the top of build.xml, or you could use the Java Extension Mechanism and add them to java.ext.dirs.

None of this is relevant if you simply want to use the library, just look at the prebuild versions in lib.

Running Tests

Tests currently only work for J2SE 5.0. Run: ant test

J2ME

Only one source file is specificly for J2ME: 'IDPExecutor.java. It is not compiled by default.

As most J2ME toolchains expect JDK 1.3 classes (Version 47), compiling a workable J2ME version of this class is going to take a few steps, principally because the java.util.concurrent backport is compiled for JDK 1.4. Fortunately only a single class is needed from the backport.

  1. Download the backport of java.util.concurrent
  2. Compile at least the Executor class with -target 1.3
  3. In the DispatchableEvent directory, link src1.4 to src1.3 (using ln -s on unix or linkd on recent Windows)
  4. Run ant -Dsrc.version=1.3 -Dinclude.j2me=true

Obviously, if your J2ME toolchain can accept JDK 1.4 classes, most of these steps are unnecessary.

License

Copyright 2005 Andrew Thompson 
Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and associated documentation files (the "Software"), to deal 
in the Software without restriction, including without limitation the rights to 
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 
the Software, and to permit persons to whom the Software is furnished to do so, 
subject to the following conditions:
     
The above copyright notice and this permission notice shall be included in 
all copies or substantial portions of the Software.
     
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.