TrimbleCloud.Events
TrimbleCloud.Events
Section titled “TrimbleCloud.Events”Contents
Section titled “Contents”- CommonEvent
- ConnectionClosedException
- ConsumeEvent
- ConsumerException
- EventsBatch
- EventsClient
- EventsClientConfig
- EventsClientConfigValidator
- IEventsClient
- IMetric
- BatchSize(batchSize)
- ConsumerAckResponseTime(responseTime)
- IncrementAckReceived()
- IncrementBatchExpired()
- IncrementBatchesProduced()
- IncrementBatchesResent()
- IncrementBatchesSent()
- IncrementError()
- IncrementEventsConsumed()
- IncrementEventsProduced()
- IncrementSeverDisconnect()
- PublishedQueuedTime(queuedTime)
- IServiceException
- KafkaResponse
- MetricRecorder
- PublishEvent
- PublisherException
- Response
- ServerRequest
- ServiceException
- ServiceResponse
- ValidationException
- WebSocketClient
- WebSocketClientState
- Workflow
CommonEvent type
Section titled “CommonEvent type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents a common event in the system.
AdditionalFields property
Section titled “AdditionalFields property”Summary
Section titled “Summary”Gets or sets additional fields associated with the event.
ClientID property
Section titled “ClientID property”Summary
Section titled “Summary”Gets or sets the client ID associated with the event.
ConnectionID property
Section titled “ConnectionID property”Summary
Section titled “Summary”Gets or sets the connection ID associated with the event.
ConsumedQueuedTime property
Section titled “ConsumedQueuedTime property”Summary
Section titled “Summary”Gets or sets the time when the event was queued for consumption.
ConsumedTime property
Section titled “ConsumedTime property”Summary
Section titled “Summary”Gets or sets the time when the event was consumed.
Event property
Section titled “Event property”Summary
Section titled “Summary”Gets or sets the name of the event.
EventVersion property
Section titled “EventVersion property”Summary
Section titled “Summary”Gets or sets the version of the event.
JWTToken property
Section titled “JWTToken property”Summary
Section titled “Summary”Gets or sets the JWT token associated with the event.
Namespace property
Section titled “Namespace property”Summary
Section titled “Summary”Gets or sets the namespace of the event.
ProductKey property
Section titled “ProductKey property”Summary
Section titled “Summary”Gets or sets the unique key of the Event Product.
PublishedQueuedTime property
Section titled “PublishedQueuedTime property”Summary
Section titled “Summary”Gets or sets the time when the event was queued for publishing.
PublishedTime property
Section titled “PublishedTime property”Summary
Section titled “Summary”Gets or sets the time when the event was published.
ConnectionClosedException type
Section titled “ConnectionClosedException type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents an exception that is thrown when a connection is closed.
#ctor(message) constructor
Section titled “#ctor(message) constructor”Summary
Section titled “Summary”Initializes a new instance of the ConnectionClosedException class with the specified error message.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| message | System.String | The error message that explains the reason for the exception. |
ConsumeEvent type
Section titled “ConsumeEvent type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents an event that is consumed by a consumer.
CreationTime property
Section titled “CreationTime property”Summary
Section titled “Summary”Gets or sets the creation time of the consumed event.
ModelVersion property
Section titled “ModelVersion property”Summary
Section titled “Summary”Gets or sets the model version of the consumed event.
VisibilityTimeout property
Section titled “VisibilityTimeout property”Summary
Section titled “Summary”Gets or sets the visibility timeout of the consumed event.
Remarks
Section titled “Remarks”A period of time to prevent the consumer from receiving and processing the message. Minimum value = 3 seconds. Maximum value = 60 minutes.
ShallowCopy() method
Section titled “ShallowCopy() method”Summary
Section titled “Summary”Creates a shallow copy of the ConsumeEvent object.
Returns
Section titled “Returns”A shallow copy of the ConsumeEvent object.
Parameters
Section titled “Parameters”This method has no parameters.
ConsumerException type
Section titled “ConsumerException type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents an exception that occurs during event consumption by a consumer.
#ctor(message) constructor
Section titled “#ctor(message) constructor”Summary
Section titled “Summary”Initializes a new instance of the ConsumerException class with the specified error message.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| message | System.String | The error message that explains the reason for the exception. |
#ctor(message,consumeEvent) constructor
Section titled “#ctor(message,consumeEvent) constructor”Summary
Section titled “Summary”Initializes a new instance of the ConsumerException class with the specified error message and consumed event.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| message | System.String | The error message that explains the reason for the exception. |
| consumeEvent | TrimbleCloud.Events.Model.ConsumeEvent | The consumed event associated with the exception. |
ConsumeEvent property
Section titled “ConsumeEvent property”Summary
Section titled “Summary”Gets the consumed event associated with the exception.
EventsBatch type
Section titled “EventsBatch type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents a batch of events.
CreationTime property
Section titled “CreationTime property”Summary
Section titled “Summary”Gets or sets the creation time of the events batch.
Events property
Section titled “Events property”Summary
Section titled “Summary”Gets or sets the list of events.
ID property
Section titled “ID property”Summary
Section titled “Summary”Gets or sets the ID of the events batch.
ModelVersion property
Section titled “ModelVersion property”Summary
Section titled “Summary”Gets or sets the model version.
PublishedTime property
Section titled “PublishedTime property”Summary
Section titled “Summary”Gets or sets the published time of the events batch.
QueueTime property
Section titled “QueueTime property”Summary
Section titled “Summary”Gets or sets the queue time of the events batch.
RetryCount property
Section titled “RetryCount property”Summary
Section titled “Summary”Gets or sets the number of times the event batch has been retried.
ShallowCopy() method
Section titled “ShallowCopy() method”Summary
Section titled “Summary”Creates a shallow copy of the events batch.
Returns
Section titled “Returns”A new instance of the EventsBatch class with a shallow copy of the events.
Parameters
Section titled “Parameters”This method has no parameters.
EventsClient type
Section titled “EventsClient type”Namespace
Section titled “Namespace”TrimbleCloud.Events
Summary
Section titled “Summary”Represents a client for interacting with the Events Service.
#ctor() constructor
Section titled “#ctor() constructor”Summary
Section titled “Summary”Private constructor constructor used internally
Parameters
Section titled “Parameters”This constructor has no parameters.
#ctor() constructor
Section titled “#ctor() constructor”Summary
Section titled “Summary”Default constructor
Parameters
Section titled “Parameters”This constructor has no parameters.
#ctor() constructor
Section titled “#ctor() constructor”Summary
Section titled “Summary”Constructor used for unit testing
Parameters
Section titled “Parameters”This constructor has no parameters.
Active property
Section titled “Active property”Summary
Section titled “Summary”Return whether the Events Service connection is active.
Returns
Section titled “Returns”Whether the Events Service connection is active or not.
Connection property
Section titled “Connection property”Summary
Section titled “Summary”Gets the connection status of the EventsClient.
ConnectionStatus property
Section titled “ConnectionStatus property”Summary
Section titled “Summary”Return the status of Events Service connection.
Returns
Section titled “Returns”The status of the Events Service connection.
Acknowledge(acknowledgmentId) method
Section titled “Acknowledge(acknowledgmentId) method”Summary
Section titled “Summary”Method to explicitly acknowledge the message using acknowledgmentId
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| acknowledgmentId | System.String | Acknowledgment Id of the response |
CloseAsync() method
Section titled “CloseAsync() method”Summary
Section titled “Summary”Private function to close connection by stopping batcher, publisher and web socket connection Specified whether to wait for connection
Parameters
Section titled “Parameters”This method has no parameters.
CloseAsync() method
Section titled “CloseAsync() method”Summary
Section titled “Summary”Closes the connection to the events service asynchronously.
Returns
Section titled “Returns”A task representing the asynchronous operation. The task result contains a list of published events.
Parameters
Section titled “Parameters”This method has no parameters.
OnCallBack() method
Section titled “OnCallBack() method”Summary
Section titled “Summary”Invoke callback function on message, acknowledgement and exception
Parameters
Section titled “Parameters”This method has no parameters.
OnMessage() method
Section titled “OnMessage() method”Summary
Section titled “Summary”Process websocket message on receive
Parameters
Section titled “Parameters”This method has no parameters.
Poll(consumeEvent) method
Section titled “Poll(consumeEvent) method”Summary
Section titled “Summary”Polls for events to consume.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| consumeEvent | TrimbleCloud.Events.Model.ConsumeEvent | The consume event configuration. |
PublishMessage(publishEvent) method
Section titled “PublishMessage(publishEvent) method”Summary
Section titled “Summary”Publishes a message to the server.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| publishEvent | TrimbleCloud.Events.Model.PublishEvent | The event to be published. |
Exceptions
Section titled “Exceptions”| Name | Description |
|---|---|
| TrimbleCloud.Events.Model.ConnectionClosedException | Thrown when the client is already closed. |
| TrimbleCloud.Events.Model.PublisherException | Thrown when batching is disabled. |
SetWebSocket() method
Section titled “SetWebSocket() method”Summary
Section titled “Summary”Setup callback methods for web socket client and start connection
Parameters
Section titled “Parameters”This method has no parameters.
SetupWorkflow() method
Section titled “SetupWorkflow() method”Summary
Section titled “Summary”Setup publisher and batcher based on Wokflow
Parameters
Section titled “Parameters”This method has no parameters.
EventsClientConfig type
Section titled “EventsClientConfig type”Namespace
Section titled “Namespace”TrimbleCloud.Events
Summary
Section titled “Summary”Config required to create Events Client
AckRetry property
Section titled “AckRetry property”Summary
Section titled “Summary”Gets or sets the number of times to retry sending an acknowledgement.
AckWaitMS property
Section titled “AckWaitMS property”Summary
Section titled “Summary”Gets or sets the wait time in milliseconds for acknowledging events.
AuthUrl property
Section titled “AuthUrl property”Summary
Section titled “Summary”Gets or sets the Trimble Identity Token URL for authentication.
BatchBufferMS property
Section titled “BatchBufferMS property”Summary
Section titled “Summary”Gets or sets the batch buffer time in milliseconds.
BatchBufferSize property
Section titled “BatchBufferSize property”Summary
Section titled “Summary”Gets or sets the batch buffer size.
BatchExpiryMS property
Section titled “BatchExpiryMS property”Summary
Section titled “Summary”Gets or sets the batch expiry time in milliseconds.
ClientAcknowledge property
Section titled “ClientAcknowledge property”Summary
Section titled “Summary”Gets or sets a value indicating whether the client acknowledges the events.
ClientID property
Section titled “ClientID property”Summary
Section titled “Summary”Gets or sets the client ID.
ClientSecret property
Section titled “ClientSecret property”Summary
Section titled “Summary”Gets or sets the client secret used for authentication.
ConnectionRetry property
Section titled “ConnectionRetry property”Summary
Section titled “Summary”Gets or sets the number of times the connection should be retried in case of failure.
EnableBatch property
Section titled “EnableBatch property”Summary
Section titled “Summary”Gets or sets a value indicating whether batch processing is enabled.
Endpoint property
Section titled “Endpoint property”Summary
Section titled “Summary”Gets or sets the endpoint URI for the events client.
Logger property
Section titled “Logger property”Summary
Section titled “Summary”Gets or sets the logger used for logging events.
MetricRegistry property
Section titled “MetricRegistry property”Summary
Section titled “Summary”Gets or sets the metric registry for tracking metrics.
TidScope property
Section titled “TidScope property”Summary
Section titled “Summary”Gets or sets the TID scope.
Workflow property
Section titled “Workflow property”Summary
Section titled “Summary”Gets or sets the workflow associated with the events client configuration.
EventsClientConfigValidator type
Section titled “EventsClientConfigValidator type”Namespace
Section titled “Namespace”TrimbleCloud.Events
Summary
Section titled “Summary”Validates the configuration for the EventsClient.
IEventsClient type
Section titled “IEventsClient type”Namespace
Section titled “Namespace”TrimbleCloud.Events
Summary
Section titled “Summary”Represents a client for interacting with events in the Trimble Cloud.
Active property
Section titled “Active property”Summary
Section titled “Summary”Gets a value indicating whether the client is active.
Connection property
Section titled “Connection property”Summary
Section titled “Summary”Gets a value indicating whether the client is connected to the server.
ConnectionStatus property
Section titled “ConnectionStatus property”Summary
Section titled “Summary”Gets the current connection status of the WebSocket client.
Acknowledge(acknowledgmentId) method
Section titled “Acknowledge(acknowledgmentId) method”Summary
Section titled “Summary”Acknowledges the receipt of an event with the specified acknowledgment ID.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| acknowledgmentId | System.String | The ID of the event to be acknowledged. |
CloseAsync() method
Section titled “CloseAsync() method”Summary
Section titled “Summary”Closes the connection to the server and returns a list of published events that were not acknowledged.
Returns
Section titled “Returns”A task representing the asynchronous operation.
Parameters
Section titled “Parameters”This method has no parameters.
Poll(consumeEvent) method
Section titled “Poll(consumeEvent) method”Summary
Section titled “Summary”Starts polling for events from the server and consumes them using the specified event consumer.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| consumeEvent | TrimbleCloud.Events.Model.ConsumeEvent | The event consumer that will process the received events. |
PublishMessage(publishEvent) method
Section titled “PublishMessage(publishEvent) method”Summary
Section titled “Summary”Publishes a message to the server.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| publishEvent | TrimbleCloud.Events.Model.PublishEvent | The event to be published. |
Send(batch) method
Section titled “Send(batch) method”Summary
Section titled “Summary”Sends a batch of events to the server.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| batch | TrimbleCloud.Events.Model.EventsBatch | The batch of events to be sent. |
IMetric type
Section titled “IMetric type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Service
Summary
Section titled “Summary”IMetric interface for metric collection. Use this to configure the metric collector client for publishing real-time metrics if needed.
BatchSize(batchSize) method
Section titled “BatchSize(batchSize) method”Summary
Section titled “Summary”Sets total Batch size
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| batchSize | System.Int32 |
ConsumerAckResponseTime(responseTime) method
Section titled “ConsumerAckResponseTime(responseTime) method”Summary
Section titled “Summary”Sets Consumer Ack Response time
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| responseTime | System.Double |
IncrementAckReceived() method
Section titled “IncrementAckReceived() method”Summary
Section titled “Summary”Increments the Ack received by 1
Parameters
Section titled “Parameters”This method has no parameters.
IncrementBatchExpired() method
Section titled “IncrementBatchExpired() method”Summary
Section titled “Summary”Increment the batch expired by 1
Parameters
Section titled “Parameters”This method has no parameters.
IncrementBatchesProduced() method
Section titled “IncrementBatchesProduced() method”Summary
Section titled “Summary”Increments the batch produced by 1
Parameters
Section titled “Parameters”This method has no parameters.
IncrementBatchesResent() method
Section titled “IncrementBatchesResent() method”Summary
Section titled “Summary”Increments the batch resent by 1
Parameters
Section titled “Parameters”This method has no parameters.
IncrementBatchesSent() method
Section titled “IncrementBatchesSent() method”Summary
Section titled “Summary”Increments the batch sent by 1
Parameters
Section titled “Parameters”This method has no parameters.
IncrementError() method
Section titled “IncrementError() method”Summary
Section titled “Summary”Increments error occurred by 1
Parameters
Section titled “Parameters”This method has no parameters.
IncrementEventsConsumed() method
Section titled “IncrementEventsConsumed() method”Summary
Section titled “Summary”Increments event consumed by 1
Parameters
Section titled “Parameters”This method has no parameters.
IncrementEventsProduced() method
Section titled “IncrementEventsProduced() method”Summary
Section titled “Summary”Increments event produced by 1
Parameters
Section titled “Parameters”This method has no parameters.
IncrementSeverDisconnect() method
Section titled “IncrementSeverDisconnect() method”Summary
Section titled “Summary”Increments if any server disconnect by 1
Parameters
Section titled “Parameters”This method has no parameters.
PublishedQueuedTime(queuedTime) method
Section titled “PublishedQueuedTime(queuedTime) method”Summary
Section titled “Summary”Sets event published queued time
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| queuedTime | System.Double |
IServiceException type
Section titled “IServiceException type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents an exception that occurs in a service.
Message property
Section titled “Message property”Summary
Section titled “Summary”Gets the error message associated with the exception.
KafkaResponse type
Section titled “KafkaResponse type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents a response from Kafka.
AcknowledgmentId property
Section titled “AcknowledgmentId property”Summary
Section titled “Summary”Gets or sets the acknowledgment ID.
EntityId property
Section titled “EntityId property”Summary
Section titled “Summary”Gets or sets the entity ID.
Message property
Section titled “Message property”Summary
Section titled “Summary”Gets or sets the message.
MetricRecorder type
Section titled “MetricRecorder type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents the available metric recorders.
PublishEvent type
Section titled “PublishEvent type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents a publish event in the system.
EntityID property
Section titled “EntityID property”Summary
Section titled “Summary”Gets or sets the ID of the entity.
Feedback property
Section titled “Feedback property”Summary
Section titled “Summary”Gets or sets the feedback for the event.
ID property
Section titled “ID property”Summary
Section titled “Summary”Gets or sets the ID of the event.
Payload property
Section titled “Payload property”Summary
Section titled “Summary”Gets or sets the payload of the event.
TopicName property
Section titled “TopicName property”Summary
Section titled “Summary”Gets or sets the name of the topic.
ShallowCopy() method
Section titled “ShallowCopy() method”Summary
Section titled “Summary”Creates a shallow copy of the PublishEvent instance.
Returns
Section titled “Returns”A shallow copy of the PublishEvent instance.
Parameters
Section titled “Parameters”This method has no parameters.
PublisherException type
Section titled “PublisherException type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents an exception that occurs during publishing events.
#ctor(message) constructor
Section titled “#ctor(message) constructor”Summary
Section titled “Summary”Initializes a new instance of the PublisherException class with the specified error message.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| message | System.String | The error message that explains the reason for the exception. |
#ctor(message,batch) constructor
Section titled “#ctor(message,batch) constructor”Summary
Section titled “Summary”Initializes a new instance of the PublisherException class with the specified error message and events batch.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| message | System.String | The error message that explains the reason for the exception. |
| batch | TrimbleCloud.Events.Model.EventsBatch | The batch of events associated with the exception. |
Batch property
Section titled “Batch property”Summary
Section titled “Summary”Gets the batch of events associated with the exception.
Response type
Section titled “Response type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents a response object.
ServiceException property
Section titled “ServiceException property”Summary
Section titled “Summary”Gets or sets the service exception.
ServiceResponse property
Section titled “ServiceResponse property”Summary
Section titled “Summary”Gets or sets the service response.
ServerRequest type
Section titled “ServerRequest type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents a server request.
Data property
Section titled “Data property”Summary
Section titled “Summary”Gets or sets the data for the server request.
Type property
Section titled “Type property”Summary
Section titled “Summary”Gets or sets the type of the server request.
ServiceException type
Section titled “ServiceException type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents an exception that occurs in the service layer.
#ctor(message) constructor
Section titled “#ctor(message) constructor”Summary
Section titled “Summary”Initializes a new instance of the ServiceException class with a specified error message.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| message | System.String | The error message that explains the reason for the exception. |
Message property
Section titled “Message property”Summary
Section titled “Summary”Gets the error message that describes the current exception.
ServiceResponse type
Section titled “ServiceResponse type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents a service response.
AcknowledgmentId property
Section titled “AcknowledgmentId property”Summary
Section titled “Summary”Gets or sets the acknowledgment ID of the response.
ClientId property
Section titled “ClientId property”Summary
Section titled “Summary”Gets or sets the client ID.
ConnId property
Section titled “ConnId property”Summary
Section titled “Summary”Gets or sets the connection ID.
ConsumerGroupId property
Section titled “ConsumerGroupId property”Summary
Section titled “Summary”Gets or sets the consumer group ID.
ConsumerRequest property
Section titled “ConsumerRequest property”Summary
Section titled “Summary”Represents a consumer request for an event.
ErrorMessage property
Section titled “ErrorMessage property”Summary
Section titled “Summary”Gets or sets the error message.
ResponseMessages property
Section titled “ResponseMessages property”Summary
Section titled “Summary”Gets or sets the list of received response messages.
ResponseType property
Section titled “ResponseType property”Summary
Section titled “Summary”Gets or sets the response type.
UUID property
Section titled “UUID property”Summary
Section titled “Summary”Gets or sets the UUID.
ValidationException type
Section titled “ValidationException type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents an exception that occurs when there is a validation error in the service.
#ctor(message) constructor
Section titled “#ctor(message) constructor”Summary
Section titled “Summary”Initializes a new instance of the ValidationException class with the specified error message.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| message | System.String | The error message that explains the reason for the exception. |
WebSocketClient type
Section titled “WebSocketClient type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Service
#ctor() constructor
Section titled “#ctor() constructor”Summary
Section titled “Summary”Constructor used for unit testing
Parameters
Section titled “Parameters”This constructor has no parameters.
WebSocketClientState type
Section titled “WebSocketClientState type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents the state of a WebSocket client.
Workflow type
Section titled “Workflow type”Namespace
Section titled “Namespace”TrimbleCloud.Events.Model
Summary
Section titled “Summary”Represents the workflow type.