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
- Author:
- Apache MINA SSHD Project
-
-
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(Object resource)
Attempts to find the best wrapper for the resourceClass<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
-
getResourceValue
T getResourceValue()
- Returns:
- The resource value serving as basis for the provided data stream
-
forResource
static IoResource<?> forResource(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:
UnsupportedOperationException
- if no match found
-
-