Package org.apache.sshd.common
Class SyspropsMapWrapper
- java.lang.Object
-
- org.apache.sshd.common.SyspropsMapWrapper
-
public final class SyspropsMapWrapper extends Object implements Map<String,Object>
A wrapper that exposes a read-onlyMap
access to the system properties. Any attempt to modify it will throwUnsupportedOperationException
. The mapper uses theSYSPROPS_MAPPED_PREFIX
to filter and access' only these properties, ignoring all others- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description static SyspropsMapWrapper
INSTANCE
The one and only wrapper instancestatic PropertyResolver
RAW_PROPS_RESOLVER
Exposes the "raw" system properties as aPropertyResolver
without any further filteringstatic String
SYSPROPS_MAPPED_PREFIX
Prefix of properties used by the mapper to identify SSHD related settingsstatic PropertyResolver
SYSPROPS_RESOLVER
APropertyResolver
with no parent that exposes the system properties
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<String,Object>>
entrySet()
Object
get(Object key)
static String
getMappedSyspropKey(Object key)
static String
getUnmappedSyspropKey(Object key)
boolean
isEmpty()
static boolean
isMappedSyspropKey(String key)
Set<String>
keySet()
Object
put(String key, Object value)
void
putAll(Map<? extends String,?> m)
Object
remove(Object key)
int
size()
String
toString()
Collection<Object>
values()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Field Detail
-
SYSPROPS_MAPPED_PREFIX
public static final String SYSPROPS_MAPPED_PREFIX
Prefix of properties used by the mapper to identify SSHD related settings- See Also:
- Constant Field Values
-
RAW_PROPS_RESOLVER
public static final PropertyResolver RAW_PROPS_RESOLVER
Exposes the "raw" system properties as aPropertyResolver
without any further filtering
-
INSTANCE
public static final SyspropsMapWrapper INSTANCE
The one and only wrapper instance
-
SYSPROPS_RESOLVER
public static final PropertyResolver SYSPROPS_RESOLVER
APropertyResolver
with no parent that exposes the system properties
-
-
Method Detail
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<String,Object>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<String,Object>
-
isMappedSyspropKey
public static boolean isMappedSyspropKey(String key)
- Parameters:
key
- Key to be tested- Returns:
true
if key starts withSYSPROPS_MAPPED_PREFIX
and continues with a dot followed by some characters
-
getUnmappedSyspropKey
public static String getUnmappedSyspropKey(Object key)
- Parameters:
key
- Key to be transformed- Returns:
- The "pure" key name if a mapped one, same as input otherwise
- See Also:
isMappedSyspropKey(String)
-
getMappedSyspropKey
public static String getMappedSyspropKey(Object key)
- Parameters:
key
- The original key- Returns:
- A key prefixed by
SYSPROPS_MAPPED_PREFIX
- See Also:
isMappedSyspropKey(String)
-
-