EventHandler Class

Handler for receiving IModelHubEvents. Use IModelClient.Events to get an instance of this class.

Extends

-

Methods

Name Description
createListener<T extends IModelHubEvent<T>>(requestContext: ClientRequestContext, authenticationCallback: () => Promise<AccessToken>, subscriptionId: string, iModelId: string, listener: (event: T) => void): () => void Create a listener for long polling events from an EventSubscription.  
getEvent(requestContext: ClientRequestContext, sasToken: string, baseAddress: string, subscriptionId: string, timeout?: number): Promise<undefined | IModelHubEvent> Get IModelHubEvent from the EventSubscription.  
getSASToken(requestContext: AuthorizedClientRequestContext, iModelId: string): Promise<EventSAS> Get event SAS Token.  

Inherited methods

Name Inherited from Description
getEventRequestOptions(operation: , sasToken: string, requestTimeout?: number): Promise<RequestOptions> Protected Get event request options, gets event from queue.
setServiceBusOptions(options: RequestOptions): void Protected Get service bus parser depending on the environment.

Properties

Name Type Description
subscriptions Accessor ReadOnly EventSubscriptionHandler Get a handler for managing EventSubscriptions.  

Inherited properties

Name Type Inherited from Description
_handler Protected IModelBaseHandler  

Defined in

Last Updated: 11 June, 2024