API Reference > imodeljs-clients > iModelHubClient > EventHandler EventHandler Class Beta Handler for receiving IModelHubEvents. Use IModelClient.Events to get an instance of this class. Extends - Methods 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: , 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 core/clients/src/imodelhub/Events.ts Line 359 Last Updated: 13 June, 2024