it.geosolutions.tools.commons.listener
Class DefaultProgress

java.lang.Object
  extended by it.geosolutions.tools.commons.listener.DefaultProgress
All Implemented Interfaces:
Progress<String>

public class DefaultProgress
extends Object
implements Progress<String>

Default implementation of the interface Progress

Author:
Carlo Cancellieri - carlo.cancellieri@geo-solutions.it

Constructor Summary
DefaultProgress()
           
DefaultProgress(String name)
           
 
Method Summary
 void onCancel()
          Progress.onCancel()
 void onCompleted()
          Progress.onCompleted()
 void onDispose()
          Progress.onDispose()
 void onExceptionOccurred(Throwable exception)
          Progress.onExceptionOccurred(Throwable)
 void onNewTask(String task)
          Sets the description of the current task being performed.
 void onStart()
          Progress.onStart()
 void onUpdateProgress(float percent)
          Progress.onUpdateProgress(float)
 void onWarningOccurred(String source, String location, String warning)
          Progress.onWarningOccurred(String, String, String)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultProgress

public DefaultProgress(String name)

DefaultProgress

public DefaultProgress()
Method Detail

onNewTask

public void onNewTask(String task)
Description copied from interface: Progress
Sets the description of the current task being performed. This method is usually invoked before any progress begins. However, it is legal to invoke this method at any time during the operation, in which case the description display is updated without any change to the percentage accomplished.

Specified by:
onNewTask in interface Progress<String>
Parameters:
task - Description of the task being performed, or null if none.

onStart

public void onStart()
Progress.onStart()

Specified by:
onStart in interface Progress<String>

onUpdateProgress

public void onUpdateProgress(float percent)
Progress.onUpdateProgress(float)

Specified by:
onUpdateProgress in interface Progress<String>
Parameters:
percent - The progress as a value between 0 and 100 inclusive.

onCompleted

public void onCompleted()
Progress.onCompleted()

Specified by:
onCompleted in interface Progress<String>

onDispose

public void onDispose()
Progress.onDispose()

Specified by:
onDispose in interface Progress<String>

onCancel

public void onCancel()
Progress.onCancel()

Specified by:
onCancel in interface Progress<String>

onExceptionOccurred

public void onExceptionOccurred(Throwable exception)
Progress.onExceptionOccurred(Throwable)

Specified by:
onExceptionOccurred in interface Progress<String>
Parameters:
exception - The exception to report.

onWarningOccurred

public void onWarningOccurred(String source,
                              String location,
                              String warning)
Progress.onWarningOccurred(String, String, String)

Specified by:
onWarningOccurred in interface Progress<String>
Parameters:
source - Name of the warning source, or null if none. This is typically the filename in process of being parsed or the URL of the data being processed
location - Text to write on the left side of the warning message, or null if none. This is typically the line number where the error occured in the source file or the feature ID of the feature that produced the message
warning - The warning message.


Copyright © 2011-2012 GeoSolutions. All Rights Reserved.