Package org.apache.sling.thumbnails.extension

## Interface ThumbnailProvider

All Known Implementing Classes:
  `ImageThumbnailProvider`, `PdfThumbnailProvider`, `SlideShowThumbnailProvider`, `TikaFallbackProvider`

    @ConsumerType
    public interface ThumbnailProvider

Service for retrieving a thumbnail for the specified Resource.

### Method Summary

All Methods Instance Methods Abstract Methods
`boolean` `applies​(org.apache.sling.api.resource.Resource resource, String metaType)` Returns true if the ThumbnailProvider applies for the specified resource.
`InputStream` `getThumbnail​(org.apache.sling.api.resource.Resource resource)` Get the thumbnail from the specified resource.

### Method Detail

#### applies

    boolean applies​(org.apache.sling.api.resource.Resource resource,
                    String metaType)

Returns true if the ThumbnailProvider applies for the specified resource.

Parameters:
  `resource` - the resource to check. This resource should be a supported resource type
  `metaType` - the meta type string found for the file based on it's resource type
Returns:
  true if this ThumbnailProvider will create a thumbnail for this resource, false otherwise

#### getThumbnail

    InputStream getThumbnail​(org.apache.sling.api.resource.Resource resource)
                      throws IOException

Get the thumbnail from the specified resource.

Parameters:
  `resource` - the resource from which to retrieve the thumbnail
Returns:
  the thumbnail
Throws:
  `IOException` - an exception occurs retrieving the thumbnail