trait DatasyncClient extends AnyRef
- Alphabetic
- By Inheritance
- DatasyncClient
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
authenticate(token: String): Future[Source[AuthMessage, SourceQueueWithComplete[Any]]]
Scala API.
Scala API. Asynchronously performs an authenticate operation on Flexible Datasync, then obtains an akka stream
Source
on which authentication events may be emitted.
Events are formatted as:AuthRevokedMessage(status: String, reason: String)
when authentication is revokedErrorMessage(msg: String)
in case an error occursReconnectedMessage
in case an automatic reconnection occurs
These events extend the
AuthMessage
trait.- token
a token used to authenticate on that application.
- returns
a
Future[Source[AuthMessage, SourceQueueWithComplete[Any]]]
that may fail if operation fails.
- Exceptions thrown
AuthenticateException
if authentication process failedAuthenticateTimeoutException
if authentication process timed out (automatic re-connection may occur)DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)
-
abstract
def
authenticateJ(token: String): CompletionStage[Source[AuthMessage, SourceQueueWithComplete[Any]]]
Java API.
Java API. Asynchronously performs an authenticate operation on Flexible Datasync, then obtains an akka stream
Source
on which authentication events may be emitted.
Events are formatted as:AuthRevokedMessage(status: String, reason: String)
when authentication is revokedErrorMessage(msg: String)
in case an error occursReconnectedMessage
in case an automatic reconnection occurs
These events extend the
AuthMessage
interface.- token
a token used to authenticate on that application.
- returns
a
CompletionStage<Source<AuthMessage, SourceQueueWithComplete<Any>>>
that may fail if operation fails.
- Exceptions thrown
AuthenticateException
if authentication process failedAuthenticateTimeoutException
if authentication process timed out (automatic re-connection may occur)DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)
-
abstract
def
close(): Unit
Ends this client's Web Socket connection to Datasync, and therefore cancels all pending operations if any.
-
abstract
def
connectionStatus(): Future[Source[CnxStatusMessage, SourceQueueWithComplete[Any]]]
Scala API.
Scala API. Obtains an akka stream
Source
on which connection events may be emitted.
Events are formatted as:ConnectedMessage
as soon as connection is upDisconnectedMessage
in case connection is lostReconnectedMessage
in case connection is up after an automatic reconnectionErrorMessage(msg: String)
in case an error occurs
These events extend the
CnxStatusMessage
trait.- returns
a
Future[Source[CnxStatusMessage, SourceQueueWithComplete[Any]]]
that may fail if operation fails.
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)
-
abstract
def
connectionStatusJ(): CompletionStage[Source[CnxStatusMessage, SourceQueueWithComplete[Any]]]
Java API.
Java API. Obtains an akka stream
Source
on which connection events may be emitted.
Events are formatted as:ConnectedMessage
as soon as connection is upDisconnectedMessage
in case connection is lostReconnectedMessage
in case connection is up after an automatic reconnectionErrorMessage(msg: String)
in case an error occurs
These events extend the
CnxStatusMessage
interface.- returns
a
CompletionStage<Source<CnxStatusMessage, SourceQueueWithComplete<Any>>>
that may fail if operation fails.
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)
-
abstract
def
invalidate_authentication: Future[Unit]
Scala API.
Scala API. Asynchronously invalidate authentication to Flexible Datasync.
- returns
a
Future[Unit]
that may fail if operation fails.
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)InvalidateAuthenticationException
if authentication invalidation process failedInvalidateAuthenticationTimeoutException
if authentication invalidation process timed out (automatic re-connection may occur)
-
abstract
def
invalidate_authenticationJ: CompletionStage[Unit]
Java API.
Java API. Asynchronously invalidate authentication to Flexible Datasync.
- returns
a
CompletionStage<BoxedUnit>
that may fail if operation fails.
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)InvalidateAuthenticationException
if authentication invalidation process failedInvalidateAuthenticationTimeoutException
if authentication invalidation process timed out (automatic re-connection may occur)
-
abstract
def
listen(path: String, sendCache: Boolean = true): Future[Source[ListenMessage, SourceQueueWithComplete[Any]]]
Scala API.
Scala API. Asynchronously performs a Listen operation on Flexible Datasync, then obtains an akka stream
Source
on which listener's notifications are emitted.
Notifications are formatted as:UpdateMessage(json: String, path: String)
when data is updated on that pathMergeMessage(json: String, path: String)
when data is merged on that pathErrorMessage(msg: String)
in case an error occursReconnectedMessage
in case an automatic reconnection occurs
These notifications extend the
ListenMessage
trait.- path
the path where to get notifications, formatted as "some/path/where/to/get notifications".
- sendCache
if true, returned
Source
receives a firstUpdateMessage
notification containing data stored on the path. Defaults to true.- returns
a
Future[Source[ListenMessage, SourceQueueWithComplete[Any]]]
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)ListenException
if LISTEN process failedListenTimeoutException
if LISTEN process timed out (automatic re-connection may occur)
-
abstract
def
listenJ(path: String): CompletionStage[Source[ListenMessage, SourceQueueWithComplete[Any]]]
Java API.
Java API. Asynchronously performs a Listen operation on Flexible Datasync, then obtains an akka stream
Source
on which listener's notifications are emitted.
Notifications are formatted as:UpdateMessage(json: String, path: String)
when data is updated on that pathMergeMessage(json: String, path: String)
when data is merged on that pathErrorMessage(msg: String)
in case an error occursReconnectedMessage
in case an automatic reconnection occurs
These notifications extend the
ListenMessage
interface. A firstUpdateMessage
notification, containing data stored on the path, is sent.- path
the path where to get notifications, formatted as "some/path/where/to/get notifications".
- returns
a
CompletionStage<Source<ListenMessage, SourceQueueWithComplete<Any>>>
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)ListenException
if LISTEN process failedListenTimeoutException
if LISTEN process timed out (automatic re-connection may occur)
-
abstract
def
listenJ(path: String, sendCache: Boolean): CompletionStage[Source[ListenMessage, SourceQueueWithComplete[Any]]]
Java API.
Java API. Asynchronously performs a Listen operation on Flexible Datasync, then obtains an akka stream
Source
on which listener's notifications are emitted.
Notifications are formatted as:UpdateMessage(json: String, path: String)
when data is updated on that pathMergeMessage(json: String, path: String)
when data is merged on that pathErrorMessage(msg: String)
in case an error occursReconnectedMessage
in case an automatic reconnection occurs
These notifications extend the
ListenMessage
interface.- path
the path where to get notifications, formatted as "some/path/where/to/get notifications".
- sendCache
if true, returned
Source
receives a firstUpdateMessage
notification containing data stored on the path.- returns
a
CompletionStage<Source<ListenMessage, SourceQueueWithComplete<Any>>>
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)ListenException
if LISTEN process failedListenTimeoutException
if LISTEN process timed out (automatic re-connection may occur)
-
abstract
def
once(path: String): Future[String]
Scala API.
Scala API. Asynchronously obtains the content of a Flexible Datasync path.
- path
the path where to retrieve data, formatted as "some/path/where/to/retrieve/data".
- returns
a
Future[String]
that may fail if operation fails.
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)OnceException
if ONCE process failed
-
abstract
def
onceJ(path: String): CompletionStage[String]
Java API.
Java API. Asynchronously obtains the content of a Flexible Datasync path.
- path
the path where to retrieve data, formatted as "some/path/where/to/retrieve/data".
- returns
a
CompletionStage<String>
that may fail if operation fails.
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)OnceException
if ONCE process failed
-
abstract
def
push(path: String, json: String): Future[String]
Scala API.
Scala API. Asynchronously performs a Push operation on Flexible Datasync.
- path
the path where to push data on that application, formatted as "some/path/to/push/data". If the path does not exist, it will be created in the application's tree. The path is suffixed with a randomly generated level (something like '-KwAf_EG49lohVcG7grO') before data is stored in it. This may be useful to store statistics, for instance.
- json
a JSON string representing the data to push.
- returns
a
Future[String]
containing the unique id added to the path.
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)PutOrPushException
if PUSH process failedPutOrPushTimeoutException
if PUSH process timed out (automatic re-connection may occur)
-
abstract
def
pushJ(path: String, json: String): CompletionStage[String]
Java API.
Java API. Asynchronously performs a Push operation on Flexible Datasync.
- path
the path where to push data on that application, formatted as "some/path/to/push/data". If the path does not exist, it will be created in the application's tree. The path is suffixed with a randomly generated level (something like '-KwAf_EG49lohVcG7grO') before data is stored in it. This may be useful to store statistics, for instance.
- json
a JSON string representing the data to push.
- returns
a
CompletionStage<String>
containing the unique id added to the path.
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)PutOrPushException
if PUSH process failedPutOrPushTimeoutException
if PUSH process timed out (automatic re-connection may occur)
-
abstract
def
put(path: String, json: String): Future[Unit]
Scala API.
Scala API. Asynchronously performs a Put operation on Flexible Datasync.
- path
the path where to put data on that application, formatted as "some/path/to/put/data". If the path does not exist, it will be created in the application's tree.
- json
a JSON string representing the data to put. Notice that existing data, if any, is overwritten by the data to put.
- returns
a
Future[Unit]
that may fail if operation fails.
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)PutOrPushException
if PUT process failedPutOrPushTimeoutException
if PUT process timed out (automatic re-connection may occur)
-
abstract
def
putJ(path: String, json: String): CompletionStage[Unit]
Java API.
Java API. Asynchronously performs a Put operation on Flexible Datasync. Notice that existing data, if any, is overwritten by the data to put.
- path
the path where to put data on that application, formatted as "some/path/to/put/data". If the path does not exist, it will be created in the application's tree.
- json
a JSON string representing the data to put.
- returns
a
CompletionStage<BoxedUnit>
that may fail if operation fails.
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)PutOrPushException
if PUT process failedPutOrPushTimeoutException
if PUT process timed out (automatic re-connection may occur)
-
abstract
def
unlisten(path: String): Future[Unit]
Scala API.
Scala API. Asynchronously ends a Listen operation on Flexible Datasync.
- path
the path where to stop listening to, formatted as "some/path/where/to/stop/listening".
- returns
a
Future[Unit]
that may fail if operation fails.
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)UnlistenException
if UNLISTEN process failedUnlistenTimeoutException
if UNLISTEN process timed out (automatic re-connection may occur)
-
abstract
def
unlistenJ(path: String): CompletionStage[Unit]
Java API.
Java API. Asynchronously ends a Listen operation on Flexible Datasync.
- path
the path where to stop listening to, formatted as "some/path/where/to/stop/listening".
- returns
a
CompletionStage<BoxedUnit>
that may fail if operation fails.
- Exceptions thrown
DatasyncConnectionClosedException
if 'close' method has been calledDatasyncUnavailableException
if Web Socket is not available (may be reconnecting)UnlistenException
if UNLISTEN process failedUnlistenTimeoutException
if UNLISTEN process timed out (automatic re-connection may occur)
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )