Interface IServiceAdapter


  • public interface IServiceAdapter
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.eclipse.jetty.server.handler.ContextHandler attachService​(org.webappos.properties.WebServiceProperties svcProps, java.lang.String path, java.lang.Runnable onStopped, java.lang.Runnable onHalted)
      Initializes the corresponding service.
      void stopService()
      Stops the corresponding service (if not stopped yet).
    • Method Detail

      • attachService

        org.eclipse.jetty.server.handler.ContextHandler attachService​(org.webappos.properties.WebServiceProperties svcProps,
                                                                      java.lang.String path,
                                                                      java.lang.Runnable onStopped,
                                                                      java.lang.Runnable onHalted)
        Initializes the corresponding service.
        Parameters:
        svcProps - the contents of the service.properties file
        path - the URL path to bind with this service
        onStopped - the function to be called when the service was terminated via stopService call (onStopped can be null)
        onHalted - the function to be called when the service halted (e.g., the process died); onHalted can be null
        Returns:
        a context handler to be embedded within the webAppOS server or null, if the service has been launched by its own (in the latter case, the the web-root directory must contain some description of the service and how to connect to it); on error, throws some exception
      • stopService

        void stopService()
        Stops the corresponding service (if not stopped yet). The function must wait for the service to stop (or forcefully terminate the service, if waiting was too long).