NeuroKernel System Manager
System manager is a vital part of the system because it manages how to start the system. If the system is a multi-user system, then the system manager shows a login screen. Kernel directly initiates the system manager after it is ready. Sole purpose of a system manager could be just load the system information to the kernel from a resource file. In any case, kernel requires a system manager to start operating. Browser window is the display of the system. Server side applications send protocol requests to display server to render their user interface. It is possible to offer a list of servers to connect to or query them in a way so that user can easily change the server connected. The locale used can also be selectable if implemented. Developers can implement their own system managers.
System manager class has methods to change the server or essentially display, or locale which we do not use on our default system manager. Large organizations may write custom system managers with a drop down option to choose a server or locale.

1. A Simple System Manager
A writing a system manager is a little bit more tedious job than writing a desktop manager. It is a vital part of the system so extra caution must be taken. Something similar to the default system manager of NeuroKernel would be a little bit too big to put on here so we are going to put a simple one. The system manager code below is the actual manager used by our web site. It actually does nothing but return system registry information from a server side XML file. First thing to do here is to extend the NSystemManager
class. We have to override functions that we do not need. The application will run in plugin mode by the kernel task, and must be named “dspmgrd” in the application registry.
As seen from the code, application wont run as a remote application, and it loads the registry data that lists the applications demos to run from the “dspmgrd” application directory as specified by the NeuroKernel recognized URL. The getURL method actually parses the URL/URI entry automatically, and you do not need to pass application class reference as usually done while creating the URL. Some URLs will be recognized by the rendering engine internally such as cached data URLs. Because our web site demo does not require multi user login, we have overridden the vital methods with empty methods.
import com.neurokernel.client.IObserver; import com.neurokernel.system.annotation.Configure; import com.neurokernel.system.annotation.Include; import com.neurokernel.system.annotation.LoadResources; import com.neurokernel.system.annotation.Executable; import com.neurokernel.system.constants.CodeSegment; import com.neurokernel.system.manager.NSystemManager; import com.neurokernel.system.net.IConnection; import com.neurokernel.system.IDisplay; import com.neurokernel.system.net.IServiceListener; @LoadResources( loadIcon = false ) @Configure( compileIn = { @Include(CodeSegment.USER_INTERFACE), @Include(CodeSegment.PLUGIN), @Include(CodeSegment.SERVICES) } ) @Executable("dspmgrd") public final class WebSiteManager extends NSystemManager { private static final long serialVersionUID = 1L; @Override public void main(int argc, String[] argv) { if(!getSystem().isRemoteTask()) { IDisplay display=getDisplay(); display.setMobileFactor(display.isSmallFactor()); getMainFrame().setVisible(true); } else { exit(0); } } @Override public void onRemoteLogin(String userId, String password, IServiceListener listener) { } @Override public void onLogout() { } @Override public void onLoadSystemData(final IObserver listener) { if(hasDesktopData()) { getResource(getURL("n:data/website.xml"), connection -> { if(connection.hasError())listener.setValue(null); else listener.setValue(connection.readString()); }); } } @Override public void loginScreen(boolean show) { } @Override public void changePassword() { } @Override public void onReady() { } }