Top Description Fields Methods
org.apache.sshd.server

public Interface Environment

Known Direct Implementers
org.apache.sshd.server.StandardEnvironment
Imports
java.util.Collection, .Map, org.apache.sshd.common.channel.PtyMode, org.apache.sshd.common.util.GenericUtils

Interface providing access to the environment map and allowing the registration of listeners for certain signals.
See Also
org.apache.sshd.server.Signal

Field Summary

Modifier and TypeField and Description
public static final String
ENV_COLUMNS

Key for the columns environment variable.

public static final String
ENV_LINES

Key for the lines environment variable.

public static final String
ENV_TERM

Key for the term environment variable.

public static final String
ENV_USER

Key for the user environment variable

Method Summary

Modifier and TypeMethod and Description
public default void
addSignalListener(SignalListener
the SignalListener to register
listener
,
Signal...
The (never null/empty) Signals the listener is interested in
signals
)

Add a qualified listener for the specific signals

public default void
addSignalListener(SignalListener
the SignalListener to register
listener
)

Add a global listener for all signals

public void
addSignalListener(SignalListener
the SignalListener to register
listener
,
Collection<Signal>
the Signals the listener is interested in
signals
)

Add a qualified listener for the specific signals

public Map<String, String>

Returns:

the environment Map - never null
getEnv
()

Retrieve the environment map

public Map<PtyMode, Integer>

Returns:

the Map of PtyModes - never null
getPtyModes
()

Retrieve the PTY modes settings

public void
removeSignalListener(SignalListener
the SignalListener to remove
listener
)

Remove a previously registered listener for all the signals it was registered

Field Detail

ENV_COLUMNSback to summary
public static final String ENV_COLUMNS

Key for the columns environment variable. Specifies the number of columns visible on the client side. ENV_LINES and ENV_COLUMNS make up the console screen size.

ENV_LINESback to summary
public static final String ENV_LINES

Key for the lines environment variable. Specifies the number of lines visible on the client side. ENV_LINES and ENV_COLUMNS make up the console screen size.

ENV_TERMback to summary
public static final String ENV_TERM

Key for the term environment variable. Describes the terminal or terminal emulation which is in use.

ENV_USERback to summary
public static final String ENV_USER

Key for the user environment variable

Method Detail

addSignalListenerback to summary
public default void addSignalListener(SignalListener listener, Signal... signals)

Add a qualified listener for the specific signals

Parameters
listener:SignalListener

the SignalListener to register

signals:Signal[]

The (never null/empty) Signals the listener is interested in

addSignalListenerback to summary
public default void addSignalListener(SignalListener listener)

Add a global listener for all signals

Parameters
listener:SignalListener

the SignalListener to register

addSignalListenerback to summary
public void addSignalListener(SignalListener listener, Collection<Signal> signals)

Add a qualified listener for the specific signals

Parameters
listener:SignalListener

the SignalListener to register

signals:Collection<Signal>

the Signals the listener is interested in

getEnvback to summary
public Map<String, String> getEnv()

Retrieve the environment map

Returns:Map<String, String>

the environment Map - never null

getPtyModesback to summary
public Map<PtyMode, Integer> getPtyModes()

Retrieve the PTY modes settings

Returns:Map<PtyMode, Integer>

the Map of PtyModes - never null

removeSignalListenerback to summary
public void removeSignalListener(SignalListener listener)

Remove a previously registered listener for all the signals it was registered

Parameters
listener:SignalListener

the SignalListener to remove