Class Feralcore

  extended by Feralcore

public final class Feralcore
extends java.lang.Object

This is the top level class for feralcore. It is the feralcore kernel. It is single-threaded. It is completely portable Java since it avoids such things as JNI. To paraphrase from page 18 of [1], it isn't possible to modify security policies programmatically except in special circumstances. There is no API in the default sandbox that a programmer can use to adjust the security policy. When a security manager is used and you want your program to write to a file you need to tell the user who will run the program to change the security policy before running the program. For this reason and to keep things simple feralcore will halt with an exception if it is not started with a security manager installed.

This class used to have private data members. This design made sense for the following reason. A feralcore node stores core memory, a list of running processes, etc. So, having those objects be private mutable data members is logical. However, in so doing, all non-static member functions had access to them. A stronger data encapsulation approach has no mutable data members and all static member functions. It has core memory, the list of running processes, etc. as local variables just before the main event loop. References to those objects are passed to static member functions to let them change the state of the objects. This design has stronger data encapsulation since fewer member functions can change the state of those objects. In the end, this is the design that was chosen.

[1] Scott Oaks, Java Security, O'Reilly, 2nd edition, May 2001.

Method Summary
static void main(java.lang.String[] args)
          If an exception is thrown in mainloop() then the exception and the stack trace of it are written to a log file.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail


public static void main(java.lang.String[] args)
                 throws java.lang.Exception
If an exception is thrown in mainloop() then the exception and the stack trace of it are written to a log file.