Class ShareErrorEvent


public class ShareErrorEvent extends ClientEvent<ShareListener>
Event fired when a share operation fails.
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • ShareErrorEvent

      public ShareErrorEvent(String message, String errorType)
      Constructs a ShareErrorEvent.
      Parameters:
      message - The error message.
      errorType - The type of error (e.g., "AbortError", "NotAllowedError").
  • Method Details

    • getMessage

      public String getMessage()
      Returns the error message.
      Returns:
      The error message.
    • getErrorType

      public String getErrorType()
      Returns the error type.

      Common error types:

      • AbortError: User cancelled the share operation
      • NotAllowedError: Permission denied or not triggered by user action
      • TypeError: Invalid share data
      Returns:
      The error type.
    • isCancelled

      public boolean isCancelled()
      Returns whether the user cancelled the share operation.
      Returns:
      True if the user cancelled.
    • dispatchTo

      public void dispatchTo(ShareListener listener)
      Description copied from class: Event
      Dispatches this event to the specified listener.

      Subclasses implement this method to call the appropriate handler method on the listener interface.

      Specified by:
      dispatchTo in class Event<ShareListener>
      Parameters:
      listener - the listener to dispatch this event to
    • toString

      public String toString()
      Overrides:
      toString in class Object