-
- All Implemented Interfaces:
-
org.readium.r2.shared.util.Closeable
public interface Publication.Service implements Closeable
Base interface to be implemented by all publication services.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classPublication.Service.ContextContainer for the context from which a service is created.
-
Method Summary
Modifier and Type Method Description Resourceget(Link link)A service can return a Resource to: respond to a request to its web API declared in links,
serve additional resources on behalf of the publication,
replace a publication resource by its own version.
Unitclose()Closes any opened file handles, removes temporary files, etc. List<Link>getLinks()-
-
Method Detail
-
get
Resource get(Link link)
A service can return a Resource to:
respond to a request to its web API declared in links,
serve additional resources on behalf of the publication,
replace a publication resource by its own version.
Called by Publication.get for each request.
Warning: If you need to request one of the publication resources to answer the request, use the Fetcher provided by the Publication.Service.Context instead of Publication.get, otherwise it will trigger an infinite loop.
-
-
-