Top Description Methods
org.springframework.web.reactive.resource

public Interface ResourceTransformerChain

Known Direct Implementers
org.springframework.web.reactive.resource.DefaultResourceTransformerChain
Imports
reactor.core.publisher.Mono, org.springframework.core.io.Resource, org.springframework.web.server.ServerWebExchange

A contract for invoking a chain of ResourceTransformers where each resolver is given a reference to the chain allowing it to delegate when necessary.
Author
Rossen Stoyanchev
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public ResourceResolverChain
getResolverChain()

Return the ResourceResolverChain that was used to resolve the Resource being transformed.

public Mono<Resource>

Returns:

the transformed or the same resource, never empty
transform
(ServerWebExchange
the current exchange
exchange
,
Resource
the candidate resource to transform
resource
)

Transform the given resource.

Method Detail

getResolverChainback to summary
public ResourceResolverChain getResolverChain()

Return the ResourceResolverChain that was used to resolve the Resource being transformed. This may be needed for resolving related resources, e.g. links to other resources.

transformback to summary
public Mono<Resource> transform(ServerWebExchange exchange, Resource resource)

Transform the given resource.

Parameters
exchange:ServerWebExchange

the current exchange

resource:Resource

the candidate resource to transform

Returns:Mono<Resource>

the transformed or the same resource, never empty