GlobalEventHandler Class


Handler for receiving IModelHubGlobalEvents. Use IModelClient.GlobalEvents to get an instance of this class.


  • EventBaseHandler


Name Description
createListener(requestContext: AuthorizedClientRequestContext, authenticationCallback: () => Promise<AccessToken>, subscriptionInstanceId: string, listener: (event: IModelHubGlobalEvent) => void): () => void Create a listener for long polling events from a GlobalEventSubscription.  
getEvent(requestContext: ClientRequestContext, sasToken: string, baseAddress: string, subscriptionId: string, timeout?: number, getOperation: GetEventOperationType = GetEventOperationType.Destructive): Promise<IModelHubGlobalEvent | undefined> Get an IModelHubGlobalEvent from the GlobalEventSubscription.  
getSASToken(requestContext: AuthorizedClientRequestContext): Promise<GlobalEventSAS> Get global 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 GlobalEventSubscriptionHandler Get a handler for managing GlobalEventSubscriptions.  

Inherited properties

Name Type Inherited from Description
_handler Protected IModelBaseHandler EventBaseHandler  

Defined in

Last Updated: 08 January, 2020