IModelHost Class

IModelHost initializes imodeljs-backend and captures its configuration. A backend must call IModelHost.startup before using any backend classes. See the learning article

Methods

Name Description
getAccessToken(requestContext: ClientRequestContext = new BackendRequestContext()): Promise<AccessToken> Static Get the active authorization/access token for use with various services  
shutdown(): void Static This method must be called when an iModel.js services is shut down.  
startup(configuration: IModelHostConfiguration = new IModelHostConfiguration()): void Static This method must be called before any iModel.js services are used.  

Properties

Name Type Description
appAssetsDir Accessor StaticReadOnly string | undefined The directory where the app's assets may be found  
applicationId Static string The Id of this backend application - needs to be set only if it is an agent application.  
applicationVersion Static string The version of this backend application - needs to be set if is an agent application.  
authorizationClient Accessor Static IAuthorizationClient | undefined Implementation of IAuthorizationClient to supply the authorization information for this session - only required for backend applications  
backendVersion Static string    
configuration Static undefined | IModelHostConfiguration    
onAfterStartup Static BeEvent<() => void> Event raised just after the backend IModelHost was started up  
onBeforeShutdown Static BeEvent<() => void> Event raised just before the backend IModelHost is to be shut down  
sessionId Static GuidString A uniqueId for this backend session  
tileContentRequestTimeout Accessor StaticReadOnly number The time, in milliseconds, for which IModelTileRpcInterface.requestTileContent should wait before returning a "pending" status.  
tileTreeRequestTimeout Accessor StaticReadOnly number The time, in milliseconds, for which IModelTileRpcInterface.requestTileTreeProps should wait before returning a "pending" status.  
useTileContentThreadPool Accessor StaticReadOnly boolean If true, requests for tile content will execute on a separate thread pool in order to avoid blocking other, less expensive asynchronous requests such as ECSql queries.  
usingExternalTileCache Accessor StaticReadOnly boolean Whether external tile caching is active.  

Defined in

Last Updated: 13 May, 2019