EventHandler Class


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


  • EventBaseHandler


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

Inherited methods

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


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

Inherited properties

Name Type Inherited from Description
_handler Protected IModelBaseHandler EventBaseHandler  

Defined in

Last Updated: 08 January, 2020