| Interface | Description |
|---|---|
| PropertiesListener |
Classes which want to be asynchronously informed about
properties changes should implement this interface and
add themselves to the properties listeners by calling
Properties.addListener(PropertiesListener). |
| TimerTaskListener |
Classes using
TimerTask
should implement this interface. |
| Class | Description |
|---|---|
| DirectExecutor |
Performs direct, synchronous runnable task execution in the
current thread.
|
| EventThread |
A Java thread with a
EventThread.run() method that
iterates over a Java BlockingQueue, processing
each event in the same order as posted. |
| HexDump |
HexDump.dump(byte[], String) generates a standard hexdump
textual representation of binary data. |
| IndexCache |
Persists a one or more 4-byte, integer index values to a
specified file.
|
| IndexCache.Index |
Tracks the individual index parameters and its location
within the cache file.
|
| IndexPool |
IndexPool provides integer index value reuse. |
| JarFileLoader |
This class extends
URLClassLoader, providing
the ability to load a class from a Java jar file introduced
after JVM starts. |
| MultiKey |
Allows multi-valued keys to be used in Java's single key
Map collections. |
| MultiKey2<K1,K2> |
This
MultiKey subclass uses generics to guarantee
key type and order. |
| MultiKey3<K1,K2,K3> |
This
MultiKey subclass uses generics to guarantee
key type and order. |
| MultiKey4<K1,K2,K3,K4> |
This
MultiKey subclass uses generics to guarantee
key type and order. |
| Properties |
Properties extends
java.util.Properties to include:
Loading properties from a named file and returning
a net.sf.eBus.util.Properties object. |
| PropertiesEvent |
Contains the updated
Properties object as event
source. |
| SequentialTask |
When using a thread pool to execute tasks there is no
guarantee the tasks will be executed in the same sequential
order as offered to the pool.
|
| ShutdownHook |
Provides a simple way for an console-based, Java application
main thread to wait until the virtual machine terminates.
|
| TernarySearchTree<V> |
Ternary search tree (TST)-based implementation of the
Map interface. |
| TimerEvent | |
| TimerTask |
An
eBus.util.TimerTask associates a timer
task with a TimerTaskListener. |
| Enum | Description |
|---|---|
| EventThread.RunState |
An
EventThread has seven distinct states:
NOT_STARTED: The EventThread was
instantiated but not yet started. |
net.sf.eBus. These utilities either provide
capabilities not provided by the Java standard edition or
extend existing Java classes:
EventThread: Extends
java.lang.Thread to provide event queue
processing. This class provides the thread-safe method
EventThread.add(Object) to
place events on the queue.
Subclasses then provide methods for:
EventThread.start(boolean)).
Thread.stop()).
EventThread.handleEvent(Object)
to process the next event.
SequentialTask: Offers a
different solution to the same problem that
EventThread solves: processing
an object's tasks in chronological order.
EventThread is a poor solution
for a large number of threads and infrequent events. A
thread pool
is preferable but the pool's threads execute tasks in an
undetermined order. 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,
TimerTaskListener.handleTimeout(TimerEvent)
is called.
Copyright © 2019. All rights reserved.