Package org.apache.sshd.common
Interface Property<T>
- Type Parameters:
T- The generic property type
- All Superinterfaces:
NamedResource
- All Known Implementing Classes:
Property.BaseProperty,Property.BooleanProperty,Property.CharsetProperty,Property.DurationInSecondsProperty,Property.DurationProperty,Property.EnumProperty,Property.IntegerProperty,Property.LongProperty,Property.ObjectProperty,Property.StringProperty,Property.Validating
Property definition.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classstatic classstatic classstatic classstatic classProperty.EnumProperty<T extends Enum<T>>static classstatic classstatic classstatic classstatic class -
Field Summary
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR -
Method Summary
Modifier and TypeMethodDescriptiondurationSec(String name) durationSec(String name, Duration def) durationSec(String name, Duration def, Duration min) get(PropertyResolver resolver) getOrCustomDefault(PropertyResolver resolver, T defaultValue) default TgetOrNull(PropertyResolver resolver) default TgetRequired(PropertyResolver resolver) default TgetType()default voidremove(PropertyResolver resolver) voidset(PropertyResolver resolver, T value) static <T> Property<T> validating(Property<T> prop, Consumer<? super T> validator) Methods inherited from interface org.apache.sshd.common.NamedResource
getName
-
Method Details
-
string
-
string
-
bool
-
bool
-
integer
-
integer
-
long_
-
long_
-
enum_
-
enum_
-
duration
-
duration
-
duration
-
durationSec
-
durationSec
-
durationSec
-
charset
-
charset
-
object
-
object
-
validating
-
getType
- Returns:
- Property type - Note: for primitive types the wrapper equivalent is returned
-
getDefault
- Returns:
- The
Optionalpre-defined default value
-
getRequiredDefault
-
get
- Parameters:
resolver- ThePropertyResolverto query for the property value.- Returns:
- The
Optionalresult - if resolver contains a value then the resolver's value, otherwise the pre-defineddefault
-
getRequired
- Parameters:
resolver- ThePropertyResolverto query for the property value.- Returns:
- The resolved value
- Throws:
NoSuchElementException- if resolver contains no value and nogetDefault()defined
-
getOrNull
- Parameters:
resolver- ThePropertyResolverto query for the property value.- Returns:
- The resolver's value or
nullif no specific value found in the resolver - regardless of whether there is a default value
-
getOrCustomDefault
- Parameters:
resolver- ThePropertyResolverto query for the property value.defaultValue- The default value to return if no specific value found in resolver- Returns:
- The resolver's value or specified default if no specific value found in the resolver - regardless of whether there is a default value
-
set
- Parameters:
resolver- ThePropertyResolverto update with the property value.value- The value to set
-
remove
- Parameters:
resolver- ThePropertyResolverto remove the property from
-