Top Description Fields Methods
org.apache.sshd.common

public Interface PropertyResolver

Known Direct Subinterfaces
org.apache.sshd.common.session.SessionHeartbeatController, org.apache.sshd.common.util.security.SecurityProviderRegistrar
Imports
java.nio.charset.Charset, java.util.Collections, .Map, org.apache.sshd.common.util.MapEntryUtils

Indicates an entity that can be configured using properties. The properties are simple name-value pairs where the actual value type depends on the property. Some automatic conversions may be available - e.g., from a string to a numeric or boolean value, or from int to long, etc.

Note

implementations may decide to use case insensitive property names, therefore it is highly discouraged to use names that differ from each other only in case sensitivity. Also, implementations may choose to trim whitespaces, thus such are also highly discouraged.

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
public static final PropertyResolver
EMPTY

An "empty" resolver with no properties and no parent

Method Summary

Modifier and TypeMethod and Description
public default Boolean
public default boolean
getBooleanProperty(String name, boolean def)

public default Charset
getCharset(String name, Charset defaultValue)

public default Integer
public default int
getIntProperty(String name, int def)

public default Long
public default long
getLongProperty(String name, long def)

public default Object
public PropertyResolver

Returns:

The parent resolver that can be used to query for missing properties - null if no parent
getParentPropertyResolver
()

public Map<String, Object>

Returns:

a valid Map containing configuration values, never null

Note

may be immutable.

getProperties
()

A map of properties that can be used to configure the SSH server or client.

public default String
public default String
public default boolean
public static boolean

Field Detail

EMPTYback to summary
public static final PropertyResolver EMPTY

An "empty" resolver with no properties and no parent

Method Detail

getBooleanback to summary
public default Boolean getBoolean(String name)
getBooleanPropertyback to summary
public default boolean getBooleanProperty(String name, boolean def)
getCharsetback to summary
public default Charset getCharset(String name, Charset defaultValue)
getIntegerback to summary
public default Integer getInteger(String name)
getIntPropertyback to summary
public default int getIntProperty(String name, int def)
getLongback to summary
public default Long getLong(String name)
getLongPropertyback to summary
public default long getLongProperty(String name, long def)
getObjectback to summary
public default Object getObject(String name)
getParentPropertyResolverback to summary
public PropertyResolver getParentPropertyResolver()
Returns:PropertyResolver

The parent resolver that can be used to query for missing properties - null if no parent

getPropertiesback to summary
public Map<String, Object> getProperties()

A map of properties that can be used to configure the SSH server or client. This map will never be changed by either the server or client and is not supposed to be changed at runtime (changes are not bound to have any effect on a running client or server), though it may affect the creation of sessions later as these values are usually not cached

Note

the type of the mapped property should match the expected configuration value type - Long, Integer, Boolean, String, etc.... If it doesn't, the toString() result of the mapped value is used to convert it to the required type. E.g., if the mapped value is the string "1234" and the expected value is a long then it will be parsed into one. Also, if the mapped value is an Integer but a long is expected, then it will be converted into one.

Returns:Map<String, Object>

a valid Map containing configuration values, never null

Note

may be immutable.

getStringback to summary
public default String getString(String name)
getStringPropertyback to summary
public default String getStringProperty(String name, String def)
isEmptyback to summary
public default boolean isEmpty()
isEmptyback to summary
public static boolean isEmpty(PropertyResolver resolver)