public class StandardEnvironment extends AbstractLoggingBean implements Environment
log
ENV_COLUMNS, ENV_LINES, ENV_TERM, ENV_USER
Constructor and Description |
---|
StandardEnvironment() |
Modifier and Type | Method and Description |
---|---|
void |
addSignalListener(SignalListener listener,
Collection<Signal> signals)
Add a qualified listener for the specific signals
|
Map<String,String> |
getEnv()
Retrieve the environment map
|
Map<PtyMode,Integer> |
getPtyModes()
Retrieve the PTY modes settings
|
protected Collection<SignalListener> |
getSignalListeners(Signal signal,
boolean create)
Retrieves the set of listeners registered for a signal
|
void |
removeSignalListener(SignalListener listener)
Remove a previously registered listener for all the signals it was registered
|
void |
set(String key,
String value)
Adds a variable to the environment.
|
void |
signal(Channel channel,
Signal signal) |
String |
toString() |
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addSignalListener, addSignalListener
public void addSignalListener(SignalListener listener, Collection<Signal> signals)
Environment
addSignalListener
in interface Environment
listener
- the SignalListener
to registersignals
- the Signal
s the listener is interested inpublic Map<String,String> getEnv()
Environment
getEnv
in interface Environment
Map
- never null
public Map<PtyMode,Integer> getPtyModes()
Environment
getPtyModes
in interface Environment
Map
of PtyMode
s - never null
public void removeSignalListener(SignalListener listener)
Environment
removeSignalListener
in interface Environment
listener
- the SignalListener
to removepublic void set(String key, String value)
set
according to the name of the
appropriate posix command set
key
- environment variable name - never null
/emptyvalue
- environment variable valueprotected Collection<SignalListener> getSignalListeners(Signal signal, boolean create)
signal
- The specified Signal
create
- If true
and no current listeners are mapped then creates a new Collection
Collection
of listeners registered for the signal - may be null
in case
create is false
Copyright © 2008–2020 The Apache Software Foundation. All rights reserved.