| Modifier and Type | Class and Description |
|---|---|
| private static class | EventDispatcher.
Container for a clip with its expiration time. |
| private static class | EventDispatcher.
Container for an event and a set of listeners to deliver it to. |
| pack-priv static interface | EventDispatcher.
Interface that a class that wants to get regular line monitor events implements. |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | AUTO_CLOSE_TIME
time of inactivity until the auto closing clips are closed. |
| private final ArrayList | |
| private final ArrayList | eventQueue
List of events. |
| pack-priv static final int | LINE_MONITOR_TIME
Approximate interval between calls to LineMonitor.checkLine |
| private final ArrayList | |
| private Thread | thread
Thread object for this EventDispatcher instance. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | addLineMonitor(EventDispatcher.
Add this LineMonitor instance to the list of monitors. |
| pack-priv void | autoClosingClipClosed(AutoClosingClip clip)
called from auto-closing clips when their closed() method is called. |
| pack-priv void | autoClosingClipOpened(AutoClosingClip clip)
called from auto-closing clips when one of their open() method is called. |
| private void | |
| pack-priv void | |
| private int | |
| private void | |
| private synchronized void | |
| pack-priv void | processEvent(EventDispatcher.
Invoked when there is at least one event in the queue. |
| pack-priv void | removeLineMonitor(EventDispatcher.
Remove this LineMonitor instance from the list of monitors. |
| public void | |
| pack-priv void | |
| pack-priv synchronized void |
| AUTO_CLOSE_TIME | back to summary |
|---|---|
| private static final int AUTO_CLOSE_TIME time of inactivity until the auto closing clips are closed. | |
| autoClosingClips | back to summary |
|---|---|
| private final ArrayList<EventDispatcher. | |
| eventQueue | back to summary |
|---|---|
| private final ArrayList<EventDispatcher. List of events. | |
| LINE_MONITOR_TIME | back to summary |
|---|---|
| pack-priv static final int LINE_MONITOR_TIME Approximate interval between calls to LineMonitor.checkLine | |
| lineMonitors | back to summary |
|---|---|
| private final ArrayList<EventDispatcher. | |
| thread | back to summary |
|---|---|
| private Thread thread Thread object for this EventDispatcher instance. | |
| EventDispatcher | back to summary |
|---|---|
| pack-priv EventDispatcher() | |
| addLineMonitor | back to summary |
|---|---|
| pack-priv void addLineMonitor(EventDispatcher. Add this LineMonitor instance to the list of monitors. | |
| autoClosingClipClosed | back to summary |
|---|---|
| pack-priv void autoClosingClipClosed(AutoClosingClip clip) called from auto-closing clips when their closed() method is called. | |
| autoClosingClipOpened | back to summary |
|---|---|
| pack-priv void autoClosingClipOpened(AutoClosingClip clip) called from auto-closing clips when one of their open() method is called. | |
| closeAutoClosingClips | back to summary |
|---|---|
| private void closeAutoClosingClips() | |
| dispatchEvents | back to summary |
|---|---|
| pack-priv void dispatchEvents() Wait until there is something in the event queue to process. Then dispatch the event to the listeners.The entire method does not need to be synchronized since this includes taking the event out from the queue and processing the event. We only need to provide exclusive access over the code where an event is removed from the queue. | |
| getAutoClosingClipIndex | back to summary |
|---|---|
| private int getAutoClosingClipIndex(AutoClosingClip clip) | |
| monitorLines | back to summary |
|---|---|
| private void monitorLines() | |
| postEvent | back to summary |
|---|---|
| private synchronized void postEvent(EventDispatcher. Queue the given event in the event queue. | |
| processEvent | back to summary |
|---|---|
| pack-priv void processEvent(EventDispatcher. Invoked when there is at least one event in the queue. Implement this as a callback to process one event. | |
| removeLineMonitor | back to summary |
|---|---|
| pack-priv void removeLineMonitor(EventDispatcher. Remove this LineMonitor instance from the list of monitors. | |
| run | back to summary |
|---|---|
| public void run() Implements java. A loop to dispatch events.
| |
| sendAudioEvents | back to summary |
|---|---|
| pack-priv void sendAudioEvents(Object event, List<Object> listeners) Send audio and MIDI events. | |
| start | back to summary |
|---|---|
| pack-priv synchronized void start() This start() method starts an event thread if one is not already active. | |
| Modifier and Type | Field and Description |
|---|---|
| private final AutoClosingClip | |
| private final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv AutoClosingClip | |
| pack-priv boolean |
| clip | back to summary |
|---|---|
| private final AutoClosingClip clip | |
| expiration | back to summary |
|---|---|
| private final long expiration | |
| ClipInfo | back to summary |
|---|---|
| pack-priv ClipInfo(AutoClosingClip clip) Create a new instance of this clip Info class. | |
| getClip | back to summary |
|---|---|
| pack-priv AutoClosingClip getClip() | |
| isExpired | back to summary |
|---|---|
| pack-priv boolean isExpired(long currTime) | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Object | |
| pack-priv Object | |
| pack-priv int |
| event | back to summary |
|---|---|
| private final Object event | |
| listeners | back to summary |
|---|---|
| private final Object[] listeners | |
| EventInfo | back to summary |
|---|---|
| pack-priv EventInfo(Object event, List<Object> listeners) Create a new instance of this event Info class | |
| getEvent | back to summary |
|---|---|
| pack-priv Object getEvent() | |
| getListener | back to summary |
|---|---|
| pack-priv Object getListener(int index) | |
| getListenerCount | back to summary |
|---|---|
| pack-priv int getListenerCount() | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| checkLine | back to summary |
|---|---|
| public void checkLine() Called by event dispatcher in regular intervals. | |