Package org.apache.sshd.common.config
Class ConfigFileReaderSupport
java.lang.Object
org.apache.sshd.common.config.ConfigFileReaderSupport
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final char
static final String
static final String
static final String
static final String
static final boolean
static final boolean
static final LogLevelValue
static final long
static final int
static final int
static final int
static final String
static final boolean
static final String
static final boolean
static final long
static final SyslogFacilityValue
static final boolean
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static Properties
Reads the configuration file contents into aProperties
instance.static Properties
readConfigFile
(InputStream input, boolean okToClose) static Properties
readConfigFile
(Reader reader, boolean okToClose) static Properties
readConfigFile
(URL url) static Properties
readConfigFile
(Path path, OpenOption... options) static String
yesNoValueOf
(boolean flag) Returns a "yes" or "no" value based on the input parameter
-
Field Details
-
COMMENT_CHAR
public static final char COMMENT_CHAR- See Also:
-
COMPRESSION_PROP
- See Also:
-
DEFAULT_COMPRESSION
-
MAX_SESSIONS_CONFIG_PROP
- See Also:
-
DEFAULT_MAX_SESSIONS
public static final int DEFAULT_MAX_SESSIONS- See Also:
-
PUBKEY_AUTH_CONFIG_PROP
- See Also:
-
DEFAULT_PUBKEY_AUTH
- See Also:
-
DEFAULT_PUBKEY_AUTH_VALUE
public static final boolean DEFAULT_PUBKEY_AUTH_VALUE -
PASSWORD_AUTH_CONFIG_PROP
- See Also:
-
DEFAULT_PASSWORD_AUTH
- See Also:
-
DEFAULT_PASSWORD_AUTH_VALUE
public static final boolean DEFAULT_PASSWORD_AUTH_VALUE -
KBD_INTERACTIVE_CONFIG_PROP
- See Also:
-
DEFAULT_KBD_INTERACTIVE_AUTH
- See Also:
-
DEFAULT_KBD_INTERACTIVE_AUTH_VALUE
public static final boolean DEFAULT_KBD_INTERACTIVE_AUTH_VALUE -
PREFERRED_AUTHS_CONFIG_PROP
- See Also:
-
LISTEN_ADDRESS_CONFIG_PROP
- See Also:
-
DEFAULT_BIND_ADDRESS
- See Also:
-
PORT_CONFIG_PROP
- See Also:
-
KEEP_ALIVE_CONFIG_PROP
- See Also:
-
DEFAULT_KEEP_ALIVE
public static final boolean DEFAULT_KEEP_ALIVE- See Also:
-
USE_DNS_CONFIG_PROP
- See Also:
-
DEFAULT_USE_DNS
public static final boolean DEFAULT_USE_DNS- See Also:
-
AUTH_KEYS_FILE_CONFIG_PROP
- See Also:
-
MAX_AUTH_TRIES_CONFIG_PROP
- See Also:
-
DEFAULT_MAX_AUTH_TRIES
public static final int DEFAULT_MAX_AUTH_TRIES- See Also:
-
MAX_STARTUPS_CONFIG_PROP
- See Also:
-
DEFAULT_MAX_STARTUPS
public static final int DEFAULT_MAX_STARTUPS- See Also:
-
LOGIN_GRACE_TIME_CONFIG_PROP
- See Also:
-
DEFAULT_LOGIN_GRACE_TIME
public static final long DEFAULT_LOGIN_GRACE_TIME -
KEY_REGENERATE_INTERVAL_CONFIG_PROP
- See Also:
-
DEFAULT_REKEY_TIME_LIMIT
public static final long DEFAULT_REKEY_TIME_LIMIT -
CIPHERS_CONFIG_PROP
- See Also:
-
MACS_CONFIG_PROP
- See Also:
-
KEX_ALGORITHMS_CONFIG_PROP
- See Also:
-
HOST_KEY_ALGORITHMS_CONFIG_PROP
- See Also:
-
LOG_LEVEL_CONFIG_PROP
- See Also:
-
DEFAULT_LOG_LEVEL
-
SYSLOG_FACILITY_CONFIG_PROP
- See Also:
-
DEFAULT_SYSLOG_FACILITY
-
SUBSYSTEM_CONFIG_PROP
- See Also:
-
-
Constructor Details
-
ConfigFileReaderSupport
private ConfigFileReaderSupport()
-
-
Method Details
-
readConfigFile
- Throws:
IOException
-
readConfigFile
- Throws:
IOException
-
readConfigFile
- Throws:
IOException
-
readConfigFile
- Throws:
IOException
-
readConfigFile
Reads the configuration file contents into aProperties
instance. Note: multiple keys value are concatenated using a comma - it is up to the caller to know which keys are expected to have multiple values and handle the split accordingly- Parameters:
rdr
- TheBufferedReader
for reading the file- Returns:
- The read properties
- Throws:
IOException
- If failed to read or malformed content
-
parseBooleanValue
- Parameters:
v
- Checks if the value is "yes", "y", "on", "t" or "true".- Returns:
- The result - Note:
null
/empty values are interpreted asfalse
- See Also:
-
yesNoValueOf
Returns a "yes" or "no" value based on the input parameter- Parameters:
flag
- The required state- Returns:
- "yes" if
true
, "no" otherwise
-