Class RuntimeApp
- All Implemented Interfaces:
IRuntimeReferenceLookup
This instance contains contains a property container for all virtualized instances
- Author:
- Christopher Mindus
Field Summary
Constructor Summary
ConstructorDescriptionRuntimeApp
(SessionInfo sessionInfo, AppFactory appFactory, PropMgr propMgr, ClientProps clientRoot, IFocusEngineProvider focusEngineProvider, IVirtualsContainer<VirtualSpace> virtualSpace) Creates the runtime application a client session.Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes of the runtime application instance for a client session.Gets the application factory.getAppID()
Gets the App ID.Gets the context menu available on the client.Gets the environment properties to use.Gets the panels available on the client.getRootFromName
(GProp<?> requestor, String module) Gets the module root for a name.GProp<?>
getRuntimePropFromReference
(String reference, boolean fallBackToNonVirtualized) Gets a reference for runtime use to get the reference of an item.static RuntimeApp
Gets the runtime application instance for the current thread in a client session.GProp<?>
getVirtualizedPropFromReference
(String reference) Attempts to look up a virtualized property from a reference.Gets the VirtualSpace current instances.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.iizix.server.app.IRuntimeReferenceLookup
getRuntimePropFromReference
Field Details
STORAGE_NAME
Local storage name in SessionInfo.
Constructor Details
RuntimeApp
public RuntimeApp(SessionInfo sessionInfo, AppFactory appFactory, PropMgr propMgr, ClientProps clientRoot, IFocusEngineProvider focusEngineProvider, IVirtualsContainer<VirtualSpace> virtualSpace) Creates the runtime application a client session.The virtual panels are added into the client root property.
- Parameters:
sessionInfo
- The session info.appFactory
- The application factory.propMgr
- The property manager for panels (the Client property manager).clientRoot
- The client root property.focusEngineProvider
- The (panel) focus engine provider.virtualSpace
- The existing VirtualSpace.
Method Details
getSessionInstance
Gets the runtime application instance for the current thread in a client session.- Returns:
- The RuntimeApp instance when called from a thread of the client session,
null
otherwise.
dispose
public void dispose()Disposes of the runtime application instance for a client session.getAppID
Gets the App ID.- Returns:
- The App ID string.
getAppFactory
Gets the application factory.- Specified by:
getAppFactory
in interfaceIRuntimeReferenceLookup
- Returns:
- The application factory.
getVirtualSpace
Gets the VirtualSpace current instances.getPanels
Gets the panels available on the client.getContextMenus
Gets the context menu available on the client.getVirtualizedPropFromReference
Attempts to look up a virtualized property from a reference.- Parameters:
reference
- The reference to look-up.- Returns:
- The virtualized instance of the property, null if not found.
getRuntimePropFromReference
Gets a reference for runtime use to get the reference of an item. The reference must be fully qualified such as "*ALIAS:/type/path" or "MODULE:/type/path" and cannot be relative.If the flag
fallBackToNonVirtualized
is false, the search will not fallback to searching for the non-virtualized property in the runtime app. The result will only returned virtualized properties, i.e. for a reference as e.g. "module:/vs/someVS", and depending on where this method is called (the client session), also includes other virtualized properties such as panels as e.g. "module:/panel/somePanel".To always fallback to also searching the runtime app, specify
fallBackToNonVirtualized
to true.- Specified by:
getRuntimePropFromReference
in interfaceIRuntimeReferenceLookup
- Parameters:
reference
- The reference to look-up.fallBackToNonVirtualized
- Flag indicating a fallback to non-virtualized properties.- Returns:
- The property found, or null for reference not found.
getRootFromName
Gets the module root for a name. In the Editor, the module is the project, and that root container is returned. In the Server, the module doesn't matter, so the real root returns itself.When running with assertions, this call throws an assertion error by default, showing that the call is directed to a non-root property container.
- Specified by:
getRootFromName
in interfaceIRuntimeReferenceLookup
- Parameters:
requestor
- The requestor property.module
- The module name (without colon), i.e. the project name in the Designer.- Returns:
- The root property container, or null if this container is not the root, or if the module name is not found. The default implementation returns null.
getEnvironment
Gets the environment properties to use.- Specified by:
getEnvironment
in interfaceIRuntimeReferenceLookup
- Returns:
- The environment for the client session.