Xj3D 2.0 VRML/X3D Code API

org.xj3d.ui.swt.widgets
Class LoadProgressListener

java.lang.Object
  extended by org.xj3d.ui.swt.widgets.LoadProgressListener
All Implemented Interfaces:
java.util.EventListener, org.ietf.uri.event.ProgressListener, StatusReporter

public class LoadProgressListener
extends java.lang.Object
implements org.ietf.uri.event.ProgressListener, StatusReporter

An implementation of the URI progress listener for distributing load progress messages to registered loggers and reporters.

Version:
$Revision: 1.1 $
Author:
Rex Melton

Constructor Summary
LoadProgressListener(StatusReporter statusRep, ErrorReporter errorRep)
          Create a new listener that puts information regarding the load process into the status line and an error logger.
 
Method Summary
 void connectionEstablished(org.ietf.uri.event.ProgressEvent evt)
          A connection to the resource has been established.
 void downloadEnded(org.ietf.uri.event.ProgressEvent evt)
          The download has ended.
 void downloadError(org.ietf.uri.event.ProgressEvent evt)
          An error has occurred during the download.
 void downloadStarted(org.ietf.uri.event.ProgressEvent evt)
          The download has started.
 void downloadUpdate(org.ietf.uri.event.ProgressEvent evt)
          The download has updated its status.
 void handshakeInProgress(org.ietf.uri.event.ProgressEvent evt)
          The header information reading and handshaking is taking place.
 void setStatusText(java.lang.String msg)
          The default sink for status messages if no status reporter has been established at instantiation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadProgressListener

public LoadProgressListener(StatusReporter statusRep,
                            ErrorReporter errorRep)
Create a new listener that puts information regarding the load process into the status line and an error logger.

Parameters:
statusRep - - The reporter of current loading status. If null, the status messages will be quietly dropped.
errorRep - - The logger of loading status messages. If null, the logged messages will be directed to the DefaultErrorReporter.
Method Detail

connectionEstablished

public void connectionEstablished(org.ietf.uri.event.ProgressEvent evt)
A connection to the resource has been established. At this point, no data has yet been downloaded.

Specified by:
connectionEstablished in interface org.ietf.uri.event.ProgressListener
Parameters:
evt - The event that caused this method to be called.

handshakeInProgress

public void handshakeInProgress(org.ietf.uri.event.ProgressEvent evt)
The header information reading and handshaking is taking place. Reading and intepreting of the data (a download started event) should commence shortly. When that begins, you will be given the appropriate event.

Specified by:
handshakeInProgress in interface org.ietf.uri.event.ProgressListener
Parameters:
evt - The event that caused this method to be called.

downloadStarted

public void downloadStarted(org.ietf.uri.event.ProgressEvent evt)
The download has started.

Specified by:
downloadStarted in interface org.ietf.uri.event.ProgressListener
Parameters:
evt - The event that caused this method to be called.

downloadUpdate

public void downloadUpdate(org.ietf.uri.event.ProgressEvent evt)
The download has updated its status.

Specified by:
downloadUpdate in interface org.ietf.uri.event.ProgressListener
Parameters:
evt - The event that caused this method to be called.

downloadEnded

public void downloadEnded(org.ietf.uri.event.ProgressEvent evt)
The download has ended.

Specified by:
downloadEnded in interface org.ietf.uri.event.ProgressListener
Parameters:
evt - The event that caused this method to be called.

downloadError

public void downloadError(org.ietf.uri.event.ProgressEvent evt)
An error has occurred during the download.

Specified by:
downloadError in interface org.ietf.uri.event.ProgressListener
Parameters:
evt - The event that caused this method to be called.

setStatusText

public void setStatusText(java.lang.String msg)
The default sink for status messages if no status reporter has been established at instantiation.

Specified by:
setStatusText in interface StatusReporter
Parameters:
msg - - The current status message

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium