Package org.apache.sshd.common
Class Property.BaseProperty<T>
java.lang.Object
org.apache.sshd.common.Property.BaseProperty<T>
- All Implemented Interfaces:
NamedResource,Property<T>
- Direct Known Subclasses:
Property.BooleanProperty,Property.CharsetProperty,Property.DurationProperty,Property.EnumProperty,Property.IntegerProperty,Property.LongProperty,Property.ObjectProperty,Property.StringProperty
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.sshd.common.Property
Property.BaseProperty<T>, Property.BooleanProperty, Property.CharsetProperty, Property.DurationInSecondsProperty, Property.DurationProperty, Property.EnumProperty<T extends Enum<T>>, Property.IntegerProperty, Property.LongProperty, Property.ObjectProperty, Property.StringProperty, Property.Validating<T> -
Field Summary
FieldsFields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseProperty(String name, Class<T> type) protectedBaseProperty(String name, Class<T> type, T defaultValue) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TfromStorage(Object value) get(PropertyResolver resolver) getName()getOrCustomDefault(PropertyResolver resolver, T defaultValue) getType()voidset(PropertyResolver resolver, T value) protected ObjecttoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sshd.common.Property
getOrNull, getRequired, getRequiredDefault, remove
-
Field Details
-
name
-
type
-
defaultValue
-
-
Constructor Details
-
BaseProperty
-
BaseProperty
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceNamedResource- Returns:
- The resource name
-
getType
-
getDefault
- Specified by:
getDefaultin interfaceProperty<T>- Returns:
- The
Optionalpre-defined default value
-
get
-
getOrCustomDefault
- Specified by:
getOrCustomDefaultin interfaceProperty<T>- 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
- Specified by:
setin interfaceProperty<T>- Parameters:
resolver- ThePropertyResolverto update with the property value.value- The value to set
-
toStorage
-
fromStorage
-
toString
-