Class API


  • public class API
    extends java.lang.Object
    Provides access to webAppOS Server-side API for accessing certain server-side resources (such as MRAM, Registry, etc.), which are shared between the server-side bridge and web processors (which are different processes). The API class ensures synchronized access to the resources.
    Author:
    Sergejs Kozlovics
    • Constructor Detail

      • API

        public API()
    • Method Detail

      • initAPI

        public static void initAPI()
        Initializes webAppOS Server-Side API within webAppOS Gate. In addition, initializes APIForServerBridge and Java RMI service for web processors.
      • initAPI

        public static void initAPI​(java.lang.String webProcessorID,
                                   java.lang.String webProcBusURL,
                                   IRWebProcessor wpAPI,
                                   boolean register)
        Initializes webAppOS Server-Side API within a web processor.
        Parameters:
        webProcessorID - the web processor ID passed to it as a command-line argument
        webProcBusURL - the URL of the Web Processor Bus Service for handling RMI requests
        wpAPI - web processor RMI API (IRWebProcessor) for this web processor
        register - whether to register the Web Processor within Web Processor Bus Service; if false, the web processor must be registered later by calling API.wpbService.registerWebProcessor
      • initOfflineAPI

        public static void initOfflineAPI()
        Initializes webAppOS API for offline mode, where web calls can be called (in inline mode, i.e., without web processors) and projects can be opened to perform some maintenance without running the whole webAppOS.
      • addShutDownListener

        public static void addShutDownListener​(org.webappos.server.IShutDownListener l)