Package net.sf.eBus.util

Contains supporting utility Java classes for net.sf.eBus. These utilities either provide capabilities not provided by the Java standard edition or extend existing Java classes:
  • SequentialTask: If tasks associated with the same object must execute in chronological order, SequentialTask guarantees that ordering. Tasks associated with different objects can execute in parallel.
  • HexDump: Binary data hex dump generator.
  • IndexCache: Stores the latest index value in a specified file. This class is used when a unique index value must be maintained across an application's separate executions. IndexCache does not support index sharing by multiple applications running simultaneously. It is designed to work with a single application only.
  • IndexPool: Tracks which integer indices are in use and returns to the caller the minimum index available. For example, if you need to use an index value between 0 and 99 inclusive and indices 0, 1 and 3 are in use, then IndexPool.nextIndex() returns 2. The application is responsible for informing IndexPool when an index in no longer in use by calling IndexPool.returnIndex(int).
  • MultiKey: Allows multiple objects to be used as a single Java map key. Obviates the need for nested maps.

    The multikey code belongs to Howard Lewis Ship and Stephen Colebourne and is under the Apache license.

  • Properties: Extends java.lang.Properties class. Provides access to multiple property files and additional methods for retrieving boolean, int, double and String[] arrays from a properties list or placing into the properties list. Also provides Properties.addListener(PropertiesListener) and Properties.removeListener(PropertiesListener) methods. When the underlying properties file changes, Properties reloads the file and then informs all registered PropertiesListeners.
  • TernarySearchTree: Implements the Bentley, Sedgewick ternary search tree (TST) as a Java map. Keys are restricted to Java character sequences. TST only partially follows the Java Map interface. The keySet, values and entrySet methods return collections that are not backed by the map. Modifying these returned collections does not modify the map.
  • TimerTask: Extends java.util.TimerTask. Associates a TimerTaskListener with the TimerTask. When the timer expires, handleTimeout(TimerEvent) is called.