Class StandardEnvironment

All Implemented Interfaces:
Environment

public class StandardEnvironment extends AbstractLoggingBean implements Environment
Author:
Apache MINA SSHD Project
  • Constructor Details

    • StandardEnvironment

      public StandardEnvironment()
  • Method Details

    • addSignalListener

      public void addSignalListener(SignalListener listener, Collection<Signal> signals)
      Description copied from interface: Environment
      Add a qualified listener for the specific signals
      Specified by:
      addSignalListener in interface Environment
      Parameters:
      listener - the SignalListener to register
      signals - the Signals the listener is interested in
    • getEnv

      public Map<String,String> getEnv()
      Description copied from interface: Environment
      Retrieve the environment map
      Specified by:
      getEnv in interface Environment
      Returns:
      the environment Map - never null
    • getPtyModes

      public Map<PtyMode,Integer> getPtyModes()
      Description copied from interface: Environment
      Retrieve the PTY modes settings
      Specified by:
      getPtyModes in interface Environment
      Returns:
      the Map of PtyModes - never null
    • removeSignalListener

      public void removeSignalListener(SignalListener listener)
      Description copied from interface: Environment
      Remove a previously registered listener for all the signals it was registered
      Specified by:
      removeSignalListener in interface Environment
      Parameters:
      listener - the SignalListener to remove
    • signal

      public void signal(Channel channel, Signal signal)
    • set

      public void set(String key, String value)
      Adds a variable to the environment. This method is called set according to the name of the appropriate posix command set
      Parameters:
      key - environment variable name - never null/empty
      value - environment variable value
    • getSignalListeners

      protected Collection<SignalListener> getSignalListeners(Signal signal, boolean create)
      Retrieves the set of listeners registered for a signal
      Parameters:
      signal - The specified Signal
      create - If true and no current listeners are mapped then creates a new Collection
      Returns:
      The Collection of listeners registered for the signal - may be null in case create is false
    • toString

      public String toString()
      Overrides:
      toString in class Object