Class ContextImpl

    • Constructor Detail

      • ContextImpl

        public ContextImpl​(Properties defaults)
    • Method Detail

      • isConnected

        public boolean isConnected()
        Specified by:
        isConnected in interface Context
      • connect

        public Connection connect​(org.aesh.command.shell.Shell shell,
                                  String connectionString)
        Description copied from interface: Context
        Connects to a server
        Specified by:
        connect in interface Context
        Returns:
      • connect

        public Connection connect​(org.aesh.command.shell.Shell shell,
                                  String connectionString,
                                  String username,
                                  String password)
        Description copied from interface: Context
        Connect to a server using the supplied username and password
        Specified by:
        connect in interface Context
        Returns:
      • changeResource

        public org.aesh.command.CommandResult changeResource​(Class<? extends Resource> fromResource,
                                                             String resourceType,
                                                             String name)
                                                      throws org.aesh.command.CommandException
        Specified by:
        changeResource in interface Context
        Throws:
        org.aesh.command.CommandException
      • disconnect

        public void disconnect()
        Description copied from interface: Context
        Disconnects from the server
        Specified by:
        disconnect in interface Context
      • getEncoding

        public org.infinispan.commons.dataconversion.MediaType getEncoding()
        Specified by:
        getEncoding in interface Context
      • setEncoding

        public void setEncoding​(org.infinispan.commons.dataconversion.MediaType encoding)
        Specified by:
        setEncoding in interface Context
      • setConsole

        public void setConsole​(org.aesh.readline.ReadlineConsole console)
        Specified by:
        setConsole in interface Context
      • getRegistry

        public org.aesh.command.registry.CommandRegistry<? extends org.aesh.command.invocation.CommandInvocation> getRegistry()
        Specified by:
        getRegistry in interface Context
      • setRegistry

        public void setRegistry​(org.aesh.command.registry.CommandRegistry<? extends org.aesh.command.invocation.CommandInvocation> registry)
        Specified by:
        setRegistry in interface Context
      • getCurrentWorkingDirectory

        public org.aesh.io.Resource getCurrentWorkingDirectory()
        Specified by:
        getCurrentWorkingDirectory in interface org.aesh.readline.AeshContext
      • setCurrentWorkingDirectory

        public void setCurrentWorkingDirectory​(org.aesh.io.Resource cwd)
        Specified by:
        setCurrentWorkingDirectory in interface org.aesh.readline.AeshContext
      • exportedVariableNames

        public Set<String> exportedVariableNames()
        Specified by:
        exportedVariableNames in interface org.aesh.readline.AeshContext
      • exportedVariable

        public String exportedVariable​(String key)
        Specified by:
        exportedVariable in interface org.aesh.readline.AeshContext