Interface ReloadHandle<H>

Type Parameters:
H - The type of the handle.

public interface ReloadHandle<H>
The ReloadHandle interface defines those methods related to the handle based reload operation.

The handle reference requires the Reloadable interface to be implemented.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    hasReload(H aHandle)
    Determines whether the handle reference provides reloading by implementing the Reloadable interface.
    void
    reload(H aHandle)
    Reloads the (state of the) component identified by the given handle.
    default void
    reloadUnchecked(H aHandle)
    Reloads the (state of the) component by calling reload(Object) without you to require catching a IOException.
  • Method Details

    • hasReload

      boolean hasReload(H aHandle)
      Determines whether the handle reference provides reloading by implementing the Reloadable interface.
      Parameters:
      aHandle - The handle to test whether the reference provides the according functionality.
      Returns:
      True in case the reference provides the according functionality.
      Throws:
      UnknownHandleRuntimeException - Thrown in case the handle is unknown (there is none reference for this handle).
    • reload

      void reload(H aHandle) throws IOException
      Reloads the (state of the) component identified by the given handle.
      Parameters:
      aHandle - The handle identifying the component.
      Throws:
      IOException - in case reloading fails.
      UnknownHandleRuntimeException - Thrown in case the handle is unknown (there is none reference for this handle).
      UnsupportedHandleOperationRuntimeException - in case the reference of the handle does not support the requested operation.
      IllegalHandleStateChangeRuntimeException - Thrown in case a state change is not possible due to the current state the referenced component is in.
    • reloadUnchecked

      default void reloadUnchecked(H aHandle)
      Reloads the (state of the) component by calling reload(Object) without you to require catching a IOException.
      Parameters:
      aHandle - The handle identifying the component.
      Throws:
      org.refcodes.exception.RuntimeIOException - encapsulates the aCause and is thrown upon encountering a IOException exception