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
ConstructorsModifierConstructorDescriptionprotected
BaseProperty
(String name, Class<T> type) protected
BaseProperty
(String name, Class<T> type, T defaultValue) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract T
fromStorage
(Object value) get
(PropertyResolver resolver) getName()
getOrCustomDefault
(PropertyResolver resolver, T defaultValue) getType()
void
set
(PropertyResolver resolver, T value) protected Object
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
getName
in interfaceNamedResource
- Returns:
- The resource name
-
getType
-
getDefault
- Specified by:
getDefault
in interfaceProperty<T>
- Returns:
- The
Optional
pre-defined default value
-
get
-
getOrCustomDefault
- Specified by:
getOrCustomDefault
in interfaceProperty<T>
- Parameters:
resolver
- ThePropertyResolver
to 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:
set
in interfaceProperty<T>
- Parameters:
resolver
- ThePropertyResolver
to update with the property value.value
- The value to set
-
toStorage
-
fromStorage
-
toString
-