public class ImageMosaicEventHandlers extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ImageMosaicEventHandlers.ExceptionEvent
Event launched when an exception occurs.
|
static class |
ImageMosaicEventHandlers.FileProcessingEvent
A special ProcessingEvent raised when a file has completed/failed ingestion
|
static class |
ImageMosaicEventHandlers.ProcessingEvent |
static class |
ImageMosaicEventHandlers.ProcessingEventListener |
protected static class |
ImageMosaicEventHandlers.ProgressEventDispatchThreadEventLauncher
Private Class which simply fires the events using a copy of the listeners list in order to
avoid problems with listeners that remove themselves or are removed by someone else
|
Modifier and Type | Field and Description |
---|---|
protected List<ImageMosaicEventHandlers.ProcessingEventListener> |
notificationListeners
List containing all the objects that want to be notified during processing.
|
protected boolean |
sendDelayedMessages
Set this to false for command line UIs where the delayed event sending may prevent some
messages to be seen before the tool exits, to true for real GUI where you don't want the
processing to be blocked too long, or when you have slow listeners in general.
|
Constructor and Description |
---|
ImageMosaicEventHandlers() |
Modifier and Type | Method and Description |
---|---|
void |
addProcessingEventListener(ImageMosaicEventHandlers.ProcessingEventListener listener)
Adding a listener to the
ImageMosaicEventHandlers.ProcessingEventListener s' list. |
protected void |
fireEvent(Level level,
String inMessage,
double percentage)
Firing an event to listeners in order to inform them about what we are doing and about the
percentage of work already carried out.
|
protected void |
fireException(Exception ex)
Firing an exception event to listeners in order to inform them that processing broke and we
can no longer proceed.
|
protected void |
fireFileEvent(Level level,
File file,
boolean ingested,
String inMessage,
double percentage)
Firing an event to listeners in order to inform them about what we are doing and about the
percentage of work already carried out.
|
boolean |
isSendDelayedMessages() |
void |
removeAllProcessingEventListeners()
Removing all the listeners.
|
void |
removeProcessingEventListener(ImageMosaicEventHandlers.ProcessingEventListener listener)
Removing a
ImageMosaicEventHandlers.ProcessingEventListener from the listeners' list. |
void |
setSendDelayedMessages(boolean sendDelayedMessages) |
protected List<ImageMosaicEventHandlers.ProcessingEventListener> notificationListeners
protected boolean sendDelayedMessages
public final void addProcessingEventListener(ImageMosaicEventHandlers.ProcessingEventListener listener)
ImageMosaicEventHandlers.ProcessingEventListener
s' list.listener
- to add to the list of listeners.protected void fireEvent(Level level, String inMessage, double percentage)
level
- message
- The message to show.percentage
- The percentage for the process.protected void fireFileEvent(Level level, File file, boolean ingested, String inMessage, double percentage)
level
- message
- The message to show.percentage
- The percentage for the process.protected void fireException(Exception ex)
fireException(String, double, Exception)
with the exception message and -1 as percentage.ex
- the actual exception occurredpublic boolean isSendDelayedMessages()
public void setSendDelayedMessages(boolean sendDelayedMessages)
public void removeAllProcessingEventListeners()
public void removeProcessingEventListener(ImageMosaicEventHandlers.ProcessingEventListener listener)
ImageMosaicEventHandlers.ProcessingEventListener
from the listeners' list.listener
- ImageMosaicEventHandlers.ProcessingEventListener
to remove from the list of listeners.Copyright © 1996–2019 Geotools. All rights reserved.