Package org.apache.sshd.server
Class StandardEnvironment
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.server.StandardEnvironment
-
- All Implemented Interfaces:
Environment
public class StandardEnvironment extends AbstractLoggingBean implements Environment
- Author:
- Apache MINA SSHD Project
-
-
Field Summary
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Fields inherited from interface org.apache.sshd.server.Environment
ENV_COLUMNS, ENV_LINES, ENV_TERM, ENV_USER
-
-
Constructor Summary
Constructors Constructor Description StandardEnvironment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSignalListener(SignalListener listener, Collection<Signal> signals)
Add a qualified listener for the specific signalsMap<String,String>
getEnv()
Retrieve the environment mapMap<PtyMode,Integer>
getPtyModes()
Retrieve the PTY modes settingsprotected Collection<SignalListener>
getSignalListeners(Signal signal, boolean create)
Retrieves the set of listeners registered for a signalvoid
removeSignalListener(SignalListener listener)
Remove a previously registered listener for all the signals it was registeredvoid
set(String key, String value)
Adds a variable to the environment.void
signal(Channel channel, Signal signal)
String
toString()
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.server.Environment
addSignalListener, addSignalListener
-
-
-
-
Method Detail
-
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 interfaceEnvironment
- Parameters:
listener
- theSignalListener
to registersignals
- theSignal
s the listener is interested in
-
getEnv
public Map<String,String> getEnv()
Description copied from interface:Environment
Retrieve the environment map- Specified by:
getEnv
in interfaceEnvironment
- Returns:
- the environment
Map
- nevernull
-
getPtyModes
public Map<PtyMode,Integer> getPtyModes()
Description copied from interface:Environment
Retrieve the PTY modes settings- Specified by:
getPtyModes
in interfaceEnvironment
- Returns:
- the
Map
ofPtyMode
s - nevernull
-
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 interfaceEnvironment
- Parameters:
listener
- theSignalListener
to remove
-
set
public void set(String key, String value)
Adds a variable to the environment. This method is calledset
according to the name of the appropriate posix commandset
- Parameters:
key
- environment variable name - nevernull
/emptyvalue
- environment variable value
-
getSignalListeners
protected Collection<SignalListener> getSignalListeners(Signal signal, boolean create)
Retrieves the set of listeners registered for a signal- Parameters:
signal
- The specifiedSignal
create
- Iftrue
and no current listeners are mapped then creates a newCollection
- Returns:
- The
Collection
of listeners registered for the signal - may benull
in case create isfalse
-
-