Class OSGiConsole


  • public class OSGiConsole
    extends Object
    This class represents a simple console for accessing the underlying OSGi environment of a PepperOSGiConnector. It allows simple commands.
    Author:
    Florian Zipser
    • Constructor Detail

      • OSGiConsole

        public OSGiConsole​(PepperOSGiConnector connector,
                           String prefixPrompt)
        Initializes an object.
        Parameters:
        connector - the PepperOSGiConnector to be used to access the OSGi environment
        prefixPrompt - the prefix prompt to be displayed, before the prompt of this console.
    • Method Detail

      • start

        public void start()
        Starts this console, using std in and std out.
      • help

        public String help()
        Returns the help page for this console.
        Returns:
      • ss

        public void ss​(List<String> params,
                       PrintStream out)
        Executes OSGi command 'ss'.
        Parameters:
        params -
        out -
      • ls

        public void ls​(List<String> params,
                       PrintStream out)
        Executes OSGi command 'ls'.
        Parameters:
        params -
        out -
      • install

        public Long install​(List<String> params,
                            PrintStream out)
        Executes OSGi command 'install'.
        Parameters:
        params -
        out -
      • start

        public void start​(List<String> params,
                          PrintStream out)
        Executes OSGi command 'start'.
        Parameters:
        params -
        out -
      • installAndStart

        public void installAndStart​(List<String> params,
                                    PrintStream out)
        Executes command 'launch', calling the OSGi command 'install' and 'start'.
        Parameters:
        params -
        out -
      • update

        public void update​(List<String> params,
                           PrintStream out)
        Executes command 'update', calling the OSGi commands 'uninstall', 'install' and 'start'.
        Parameters:
        params -
        out -
      • stop

        public void stop​(List<String> params,
                         PrintStream out)
        Executes OSGi command 'stop'.
        Parameters:
        params -
        out -
      • uninstall

        public void uninstall​(List<String> params,
                              PrintStream out)
        Executes OSGi command 'uninstall'.
        Parameters:
        params -
        out -
      • remove

        public void remove​(List<String> params,
                           PrintStream out)
        Executes command 'remove'.
        Parameters:
        params -
        out -
      • transformState

        public String transformState​(int state)