Package io.goobi.viewer.websockets
Class DownloadTaskEndpoint
java.lang.Object
io.goobi.viewer.websockets.DownloadTaskEndpoint
Endpoint that maps HTTP session IDs to connected web sockets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumerates the client-initiated actions that can be sent over the WebSocket connection to control or query a download task.static classstatic classstatic enumEnumerates the runtime states of a download task as communicated to WebSocket clients. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDownloadedFiles(String pi, String downloadUrl) getDownloadFolder(String pi, String downloadUrl) getMimetype(String path) voidvoidvoidvoidvoidonOpen(Session session, EndpointConfig config) void
-
Constructor Details
-
DownloadTaskEndpoint
public DownloadTaskEndpoint()
-
-
Method Details
-
onOpen
-
onMessage
-
handleDownloadRequest
public void handleDownloadRequest(DownloadTaskEndpoint.SocketMessage message) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
startDownload
public void startDownload(DownloadTaskEndpoint.SocketMessage message) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getDownloadedFiles
public List<Path> getDownloadedFiles(String pi, String downloadUrl) throws PresentationException, IndexUnreachableException -
getDownloadFolder
public Path getDownloadFolder(String pi, String downloadUrl) throws PresentationException, IndexUnreachableException -
getMimetype
-
onClose
-
onError
-