Top Description Methods
org.springframework.core.io

public Interface ProtocolResolver

Annotations
@FunctionalInterface
Imports
org.springframework.lang.Nullable

A resolution strategy for protocol-specific resource handles.

Used as an SPI for DefaultResourceLoader, allowing for custom protocols to be handled without subclassing the loader implementation (or application context implementation).

Author
Juergen Hoeller
Since
4.3
See Also
DefaultResourceLoader#addProtocolResolver

Method Summary

Modifier and TypeMethod and Description
public Resource

Returns:

a corresponding Resource handle if the given location matches this resolver's protocol, or null otherwise
resolve
(String
the user-specified resource location
location
,
ResourceLoader
the associated resource loader
resourceLoader
)

Resolve the given location against the given resource loader if this implementation's protocol matches.

Method Detail

resolveback to summary
public Resource resolve(String location, ResourceLoader resourceLoader)

Resolve the given location against the given resource loader if this implementation's protocol matches.

Parameters
location:String

the user-specified resource location

resourceLoader:ResourceLoader

the associated resource loader

Returns:Resource

a corresponding Resource handle if the given location matches this resolver's protocol, or null otherwise

Annotations
@Nullable