| Modifier and Type | Method and Description |
|---|---|
void |
addDocument(ClientDocument<T> document)
Adds a
ClientDocument to this SyncClient. |
void |
addPatchListener(PatchListener<T> patchListener)
Add an
PatchListener that will be notified when a patch has been perfomed. |
String |
clientId()
Returns the client identifier.
|
SyncClient<T,S> |
connect()
Connects this client to a Sync Server.
|
int |
countPatchListeners()
Returns the number of currently registered
PatchListeners |
void |
deletePatchListener(PatchListener<T> patchListener)
Removes the specified
PatchListener from the list of listeners. |
void |
deletePatchListeners()
Deletes all
PatchListeners. |
void |
diffAndSend(ClientDocument<T> document)
Diff the specified
ClientDocument and send all edits to the sync server |
void |
disconnect()
Disconnect from the sync server.
|
boolean |
isConnected()
Determines whether the client is currently connected to the sync server.
|
SyncClient<T,S> connect() throws Exception
SyncClient to allow method chaining.Exception - if an occurs while connecting to the sync serverboolean isConnected()
true if the client is currently connected.void disconnect()
String clientId()
String the client identifiervoid addDocument(ClientDocument<T> document)
ClientDocument to this SyncClient.document - the document to add to the SyncClientvoid diffAndSend(ClientDocument<T> document)
ClientDocument and send all edits to the sync serverdocument - the updates made by the clientvoid addPatchListener(PatchListener<T> patchListener)
PatchListener that will be notified when a patch has been perfomed.patchListener - the listener to add.void deletePatchListener(PatchListener<T> patchListener)
PatchListener from the list of listeners.patchListener - the listener to delete from the list of listeners.void deletePatchListeners()
PatchListeners.int countPatchListeners()
PatchListenersint the number of listeners currently registered.Copyright © 2015 JBoss by Red Hat. All Rights Reserved.