Package com.io7m.sunburst.runtime
Interface SBRuntimeContextType
public interface SBRuntimeContextType
The type of runtime contexts.
-
Method Summary
Modifier and TypeMethodDescriptionGet the path of the given file.default Path
Get the path of the given file.default boolean
isFailed()
default boolean
default FileChannel
openChannel
(Class<?> requester, String targetPackage, SBPath file) Open a file channel for the given file.default FileChannel
openChannel
(Class<?> requester, String targetPackage, String file) Open a file channel for the given file.void
reload()
Reload all peers.status()
-
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 filetargetPackage
- The target packagefile
- The target file- Returns:
- A file channel
- Throws:
IOException
- On I/O errorsSBRuntimeException
- 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 filetargetPackage
- The target packagefile
- The target file- Returns:
- A file channel
- Throws:
IOException
- On I/O errorsSBRuntimeException
- On runtime errors
-
findFile
Get the path of the given file.- Parameters:
requester
- The class asking for the filetargetPackage
- The target packagefile
- 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 filetargetPackage
- The target packagefile
- The target file- Returns:
- A path
- Throws:
SBRuntimeException
- On runtime errors
-