Namespaces

Classes

Binary
BinaryDataType
BinaryDelta
Bytes
DataType
DeltaType
JSON
JSONDataType
JSONDelta
ChangeMap
Decimal
Integer
RecordContent
Field
Record
Stateless
String
ErrorReport
FetchStream
MissingTopicHandler
MissingTopicNotification
RecordContent
Builder
Record
Record
Result
SecurityScriptBuilder
Session
SessionPropertiesListener
MessageHandler
MessageStream
Stream
Subscription
SystemAuthenticationScriptBuilder
TopicSelector
TopicSpecification
TopicUpdateHandler
TypedSubscription
Updater
View

Namespaces

diffusion
clients
datatypes
metadata
selectors
topics
clients
messages
security
topics

Events

close

Emitted when the Stream has been closed through completion or the underlying session has been closed. No further events will be emitted after this.
Inherited From:

error

Emitted when an error occurs in the Stream or in any of its listeners. No further events will be emitted after this.
Properties:
Name Type Description
error Error the error that occurred
Inherited From:

open

Emitted when the fetch stream is initially opened. This will only be fired once.

value

Emitted when a topic that is selected by the fetch request's topic selector has returned its value. By default, values are provided as Buffer instances. The topic path specifies which topic this value is for.
Properties:
Name Type Description
value Buffer the new value of the topic
topicPath String the path to the topic to which the value update applies

close

Emitted when the Stream has been closed through completion or the underlying session has been closed. No further events will be emitted after this.
Inherited From:

error

Emitted when an error occurs in the Stream or in any of its listeners. No further events will be emitted after this.
Properties:
Name Type Description
error Error the error that occurred
Inherited From:

message

Emitted when a new message is received.
Properties:
Name Type Description
message Session.messages.Message the message that has been delivered.

close

Emitted when a session is closed. This can occur because it was closed by the user, closed by the server, failed to connect, or the session encountered an error. The provided close reason will contain the specific cause of the session close.
Properties:
Name Type Description
reason diffusion.clients.CloseReason the cause of the session close.

disconnect

Emitted when a connected session has lost connection to the server, and Session.Options reconnect is enabled. The provided reason will contain the specific cause of the session disconnect.
Properties:
Name Type Description
reason diffusion.clients.CloseReason the cause of the session disconnect.

error

Emitted when a session error has occurred. A session error occurs when the client cannot parse communication from the server. This occurs if a component between the two - for example, a proxy or load balancer - alters the communication.
Properties:
Name Type Description
error Error the error that occured.

reconnect

Emitted when a disconnected session has successfully reconnected.

close

Emitted when the Stream has been closed through completion or the underlying session has been closed. No further events will be emitted after this.

error

Emitted when an error occurs in the Stream or in any of its listeners. No further events will be emitted after this.
Properties:
Name Type Description
error Error the error that occurred

close

Emitted when the subscription has been closed using Subscription#close.

error

Emitted when an error occurs in the Stream or in any of its listeners. No further events will be emitted after this.
Properties:
Name Type Description
error Error the error that occurred
Inherited From:

open

Emitted when the subscription is initially opened, passing a reference to the subscription itself. This will only be fired once.

subscribe

Emitted when a topic that is selected by this Subscription's topic selector is subscribed to by this session. Once subscribed, update update events may be received for this topic
Properties:
Name Type Description
details TopicDetails the topic details of the topic to which the subscription applies
topic String the topic to which the subscription applies

unsubscribe

Emitted when a topic that was previously subscribed, has been unsubscribed. No further update events will be received from this topic until subscribed again. Unsubscriptions may occur due to the topic being removed, or through calling Session#unsubscribe - an object containing the reason is provided.
Properties:
Name Type Description
reason String the reason the unsubscription occurred
topic String the topic to which the unsubscription applies

update

Emitted when an update has been received for a topic's value. By default, values are provided as Buffer objects, unless Subscription#transform has been used to convert values to a specific type.
Properties:
Name Type Description
value Buffer the new value of the topic
topic String the topic to which the update applies

close

Emitted when the subscription has been closed using TypedSubscription#close.

error

Emitted when an error occurs in the Stream or in any of its listeners. No further events will be emitted after this.
Properties:
Name Type Description
error Error the error that occurred
Inherited From:

open

Emitted when the subscription is initially opened, passing a reference to the subscription itself. This will only be fired once.

subscribe

Emitted when a topic that is selected by this TypedSubscription's topic selector is subscribed to by this session. Once subscribed, value update events may be received for this topic<. The specification is a TopicSpecification instance that contains details about the topic.
Properties:
Name Type Description
topic String the topic to which the subscription applies
specification TopicSpecification instance that contains details about the topic

unsubscribe

Emitted when a topic that was previously subscribed, has been unsubscribed. No further update events will be received from this topic until subscribed again. Unsubscriptions may occur due to the topic being removed, or through calling Session#unsubscribe - an object containing the reason is provided.
Properties:
Name Type Description
topic String the topic to which the unsubscription applies
specification TopicSpecification instance that contains details about the topic
reason String the reason for the unsubscription

value

Emitted when an update has been received for a topic's value. Values will be provided as instances appropriate for the associated DataType this subscription was created for. Both the previous value and the new value are provided.
Properties:
Name Type Description
topic String the topic to which the update applies
specification TopicSpecification instance that contains details about the topic
newValue object the new value of the topic
oldValue object the old value of the topic

close

Emitted when the Stream has been closed through completion or the underlying session has been closed. No further events will be emitted after this.
Inherited From:

error

Emitted when an error occurs in the Stream or in any of its listeners. No further events will be emitted after this.
Properties:
Name Type Description
error Error the error that occurred
Inherited From: