public class

BlackBoxConnection

extends WebSocketListener
implements CollabManager.CollabManagerListener
java.lang.Object
   ↳ WebSocketListener
     ↳ com.pdftron.collab.webviewerserver.BlackBoxConnection

Class Overview

Handling web socket connection from client to WebViewer Server.

Summary

Public Constructors
BlackBoxConnection()
Service for WebViewer Server
Public Methods
boolean isStarted()
void onClosed(WebSocket webSocket, int code, String reason)
void onClosing(WebSocket webSocket, int code, String reason)
void onFailure(WebSocket webSocket, Throwable t, Response response)
void onMessage(WebSocket webSocket, String text)
void onOpen(WebSocket webSocket, Response response)
void onSendAnnotation(String action, ArrayList<AnnotationEntity> annotations, String documentId, String userName)
Called when local annotation changes need to be sent to the remote source
void setCollabManager(CollabManager collabManager)
void start(String wvsRoot, String wvsFileUrl, String wvsShareId, String userId, String userName)
Starts a collaboration session
void start(String wvsRoot, String wvsFileUrl, String wvsShareId)
Starts a collaboration session, a new random user will be generated and used for the session
void stop()
Stops the current collaboration session All resources are cleaned up
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pdftron.collab.ui.viewer.CollabManager.CollabManagerListener

Public Constructors

public BlackBoxConnection ()

Service for WebViewer Server

Public Methods

public boolean isStarted ()

public void onClosed (WebSocket webSocket, int code, String reason)

public void onClosing (WebSocket webSocket, int code, String reason)

public void onFailure (WebSocket webSocket, Throwable t, Response response)

public void onMessage (WebSocket webSocket, String text)

public void onOpen (WebSocket webSocket, Response response)

public void onSendAnnotation (String action, ArrayList<AnnotationEntity> annotations, String documentId, String userName)

Called when local annotation changes need to be sent to the remote source

Parameters
action one of add/modify/delete
annotations the array of changed annotations
documentId the document identifier
userName optional user name, user unique identifier should be part of the XFDF command instead

public void setCollabManager (CollabManager collabManager)

public void start (String wvsRoot, String wvsFileUrl, String wvsShareId, String userId, String userName)

Starts a collaboration session

Parameters
wvsRoot the root address of your WebViewer Server instance
wvsFileUrl the Uri to the file to be collaborated on
wvsShareId the unique identifier for an existing collaboration session, pass null to generate a new session
userId the unique identifier of the user
userName the name of the user

public void start (String wvsRoot, String wvsFileUrl, String wvsShareId)

Starts a collaboration session, a new random user will be generated and used for the session

Parameters
wvsRoot the root address of your WebViewer Server instance
wvsFileUrl the Url to the file to be collaborated on
wvsShareId the unique identifier for an existing collaboration session, pass null to generate a new session

public void stop ()

Stops the current collaboration session All resources are cleaned up