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 PathGet the path of the given file.default booleanisFailed()default booleandefault FileChannelopenChannel(Class<?> requester, String targetPackage, SBPath file) Open a file channel for the given file.default FileChannelopenChannel(Class<?> requester, String targetPackage, String file) Open a file channel for the given file.voidreload()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:
trueif the runtime loaded without any errors
-
isFailed
default boolean isFailed()- Returns:
trueif 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
-