net.dpml.transit
Class DefaultModel
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
net.dpml.util.UnicastEventSource
net.dpml.transit.DefaultModel
- All Implemented Interfaces:
- Serializable, Remote, Disposable, EventHandler
- Direct Known Subclasses:
- DefaultTransitModel
public abstract class DefaultModel
- extends UnicastEventSource
- implements Disposable
A abstract base class that established an event queue and handles event dispatch
operations for listeners declared in classes extending this base class.
- Version:
- 1.0.3
- Author:
- Digital Product Meta Library
- See Also:
- Serialized Form
Method Summary |
void |
dispose()
Dispose of the model. |
protected void |
enqueueEvent(EventObject event,
boolean waitForCompletion)
Enqueue an event for delivery to registered
listeners unless there are no registered
listeners. |
protected Logger |
getLogger()
Return the assigned logging channel. |
DefaultModel
public DefaultModel(EventQueue queue,
String name)
throws RemoteException
- Creation of a new model.
- Parameters:
queue
- the event queuename
- the name used to construct a logging channel
- Throws:
RemoteException
- if a remote exception occurs
DefaultModel
public DefaultModel(EventQueue queue,
Logger logger)
throws NullPointerException,
RemoteException
- Creation of a new model.
- Parameters:
queue
- the event queuelogger
- the assigned logging channel
- Throws:
NullPointerException
- if the supplied logging channel is null
RemoteException
- if a remote exception occurs
getLogger
protected Logger getLogger()
- Return the assigned logging channel.
- Returns:
- the logging channel
dispose
public void dispose()
- Dispose of the model.
- Specified by:
dispose
in interface Disposable
enqueueEvent
protected void enqueueEvent(EventObject event,
boolean waitForCompletion)
- Enqueue an event for delivery to registered
listeners unless there are no registered
listeners.
- Parameters:
event
- the event object to add to the queuewaitForCompletion
- if TRUE the implementation will apply
the event to the event source event handler and return on
copmpletion of evetn delivery