Interface ILcdKML22ResourceListener


public interface ILcdKML22ResourceListener

A resource listener is notified of changes to a resource. This interface is typically used in KML to signal when the loading of a resource asynchronously has finished, or when an existent resource has been updated.

This interface features two mutual exclusive methods:

  • resourceAvailable -> When the change to the resource was a success
  • resourceNotAvailable -> When the change to the resource was unsuccessful

The reason these methods are mutual exclusive is because when a notifier sends an event, it will send either a resourceAvailable event or a resourceNotAvailable event, for each individual asynchronous retrieve or update.

Since:
10.0
  • Method Details

    • resourceAvailable

      void resourceAvailable(TLcdKML22ResourceDescriptor aResourceDescriptor, Object aNewResource)

      Method that is called when a new version, including the first version, of the resource has become available.

      Parameters:
      aResourceDescriptor - Additional information about the new resource
      aNewResource - The updated version of the resource. This will never be null. If the resource update was not successful, this method will not be called.
      See Also:
    • resourceNotAvailable

      void resourceNotAvailable(TLcdKML22ResourceDescriptor aResourceDescriptor, String aReason, Exception aException)

      Method that is called when a new version of the resource could not be retrieved.

      Parameters:
      aResourceDescriptor - Additional information about the resource
      aReason - A textual representation of the reason for failure. Can be null.
      aException - An optional exception that was thrown during the retrieval/update of the resource.