Interface SBRuntimeContextType


public interface SBRuntimeContextType
The type of runtime contexts.
  • Method Details

    • reload

      void reload()
      Reload all peers.
    • status

      SBRuntimeStatus status()
      Returns:
      The status of the runtime after the most recent load
    • isSuccessful

      default boolean isSuccessful()
      Returns:
      true if the runtime loaded without any errors
    • isFailed

      default boolean isFailed()
      Returns:
      true if the runtime loaded with errors
    • openChannel

      default FileChannel openChannel(Class<?> requester, String targetPackage, SBPath file) throws IOException, SBRuntimeException
      Open a file channel for the given file.
      Parameters:
      requester - The class asking for the file
      targetPackage - The target package
      file - The target file
      Returns:
      A file channel
      Throws:
      IOException - On I/O errors
      SBRuntimeException - On runtime errors
    • openChannel

      default FileChannel openChannel(Class<?> requester, String targetPackage, String file) throws IOException, SBRuntimeException
      Open a file channel for the given file.
      Parameters:
      requester - The class asking for the file
      targetPackage - The target package
      file - The target file
      Returns:
      A file channel
      Throws:
      IOException - On I/O errors
      SBRuntimeException - On runtime errors
    • findFile

      Path findFile(Class<?> requester, String targetPackage, SBPath file) throws SBRuntimeException
      Get the path of the given file.
      Parameters:
      requester - The class asking for the file
      targetPackage - The target package
      file - The target file
      Returns:
      A path
      Throws:
      SBRuntimeException - On runtime errors
    • findFile

      default Path findFile(Class<?> requester, String targetPackage, String file) throws SBRuntimeException
      Get the path of the given file.
      Parameters:
      requester - The class asking for the file
      targetPackage - The target package
      file - The target file
      Returns:
      A path
      Throws:
      SBRuntimeException - On runtime errors