Interface EventSubscriberInterface
-
- All Known Implementing Classes:
FileContentHandler
,RestfulHttpContentHandler
public interface EventSubscriberInterface
Implement this interface to subscribe to client events. When specific events happen on the VirtualViewer client, the content handler can be notified through this interface.
Event notifications can be disabled via a client-side setting in config.js or by not implementing this interface.
Types of events:VALUE_EVENT_PAGE_REQUESTED
: Fired when a page is requested by the clientVALUE_EVENT_DOCUMENT_RETRIEVED_FROM_CACHE
: Fired when a document is loaded from the cacheVALUE_EVENT_SAVE_ANNOTATION
: Fired when annotation data is savedKEY_EVENT_ROTATE_PAGE
: Fired when a page is rotated by the userVALUE_EVENT_PRINT
: Fired when a document is printed by the userVALUE_EVENT_EXPORT
: Fired when a document is exported/downloaded by the userContentHandlerInput.VALUE_EVENT_EMAIL
: Fired when a document is emailed by the user
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContentHandlerResult
eventNotification(ContentHandlerInput input)
This method is called when some events occur in the VirtualViewer client, such as opening a document or viewing a new page on the document.
-
-
-
Method Detail
-
eventNotification
ContentHandlerResult eventNotification(ContentHandlerInput input) throws VirtualViewerAPIException
This method is called when some events occur in the VirtualViewer client, such as opening a document or viewing a new page on the document.- Parameters:
input
- ContentHandlerInput containing the following values:Every row is an expected value in the ContentHandlerInput. The first column is the string key for the value. The second column is the type of the value. The third column is the detailed description of the value. Key Type Description KEY_EVENT java.lang.Object The type of event, as a constant property of ContentHandlerInput (e.g. ContentHandlerInput.VALUE_EVENT_SAVE_DOCUMENT). KEY_CLIENT_INSTANCE_ID java.lang.String Custom configurable value used to pass data from client to content handler. If not set then will be the session ID. Can be retrieved with String clientInstanceId = input.getClientInstanceId();
KEY_HTTP_SERVLET_REQUEST javax.servlet.http.HttpServletRequest Request that called this method. Can be retrieved with HttpServletRequest request = input.getHttpServletRequest();
- Returns:
- ContentHandlerResult with no values currently expected.
- Throws:
VirtualViewerAPIException
- if content handler throws exception
-
-