Interface IoResource<T>
-
- Type Parameters:
T
- Type of resource
- All Superinterfaces:
NamedResource
,ResourceStreamProvider
- All Known Implementing Classes:
AbstractIoResource
,ClassLoaderResource
,PathResource
,URIResource
,URLResource
public interface IoResource<T> extends NamedResource, ResourceStreamProvider
-
-
Field Summary
-
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static IoResource<?>
forResource(java.lang.Object resource)
Attempts to find the best wrapper for the resourcejava.lang.Class<T>
getResourceType()
T
getResourceValue()
-
Methods inherited from interface org.apache.sshd.common.NamedResource
getName
-
Methods inherited from interface org.apache.sshd.common.util.io.resource.ResourceStreamProvider
openInputStream
-
-
-
-
Method Detail
-
getResourceType
java.lang.Class<T> getResourceType()
- Returns:
- The type of resource being represented
-
getResourceValue
T getResourceValue()
- Returns:
- The resource value serving as basis for the provided data stream
-
forResource
static IoResource<?> forResource(java.lang.Object resource)
Attempts to find the best wrapper for the resource- Parameters:
resource
- The resource object - ignored ifnull
- Returns:
- The best wrapper out of the supported ones (
null
if no initial resource) - Throws:
java.lang.UnsupportedOperationException
- if no match found
-
-