Package com.iizix.server.app
Class VirtualsContainer<PROPCNR extends PropCnr>
java.lang.Object
com.iizix.server.app.VirtualsContainer<PROPCNR>
- All Implemented Interfaces:
- IVirtualizedReferenceLookup,- IVirtualsContainer<PROPCNR>
public class VirtualsContainer<PROPCNR extends PropCnr> extends Object implements IVirtualsContainer<PROPCNR>
The Virtual Property Container is a flat structure containing all items (property containers) that are virtualized. The panels and VirtualSpace use a Virtual Property Container each. The panels instance is used to communicate with the client, and the VirtualSpace is just used in the server.
- Author:
- Christopher Mindus
- Nested Class SummaryNested ClassesModifier and TypeClassDescription- protected classThe Virtual property container.
- Constructor SummaryConstructorsConstructorDescription- VirtualsContainer- (String base, Atom atom, Class<? extends PropCnr> propClass, PropMgr propMgr, IFocusEngineProvider focusEngineProvider, IRuntimeReferenceLookup lookup, boolean isAppInstance) Constructor.
- Method SummaryModifier and TypeMethodDescription- addVirtualInstance- (IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, PROPCNR vpc, PROPCNR pc) Adds a virtualized property to the container.- void- dispose()Disposes of the virtuals container.Gets the property container of the virtuals storage.Gets the lock object used to manipulate VirtualizedItem's for multi-threaded and/or multi-session code such as the Application Session Gyro.- getVirtualContainerFromProp- (IPropCnr property) Gets the virtual container from a property.Returns the virtualized container items.- GProp- <?> - getVirtualizedPropFromReference- (String reference) Gets a property reference from the virtuals container.- booleanReturns if this is an client session virtuals container that should be destroyed when the client ends or if it's an application instance.- boolean- matchesType- (String reference) Verifies if a reference string could be present in this virtuals container, i.e.
- Constructor Details- VirtualsContainerpublic VirtualsContainer- (String base, Atom atom, Class<? extends PropCnr> propClass, PropMgr propMgr, IFocusEngineProvider focusEngineProvider, IRuntimeReferenceLookup lookup, boolean isAppInstance) Constructor.- Parameters:
- base- The base module reference string, e.g. "panel" or "vs".
- atom- The name of the container.
- propClass- Property class for all virtualized containers.
- propMgr- The property manager to use.
- focusEngineProvider- The focus engine provider, null for none.
- lookup- The look-up instance.
- isAppInstance- Set to true if this is an Application Instance and not a Client Session instance.
 
 
- Method Details- getContainerGets the property container of the virtuals storage. This method should only be used to add e.g. the virtual panels container for the client.- Returns:
- A property container for the virtualized properties.
 
- matchesTypeVerifies if a reference string could be present in this virtuals container, i.e. that the reference string matches the module folder type, e.g. "panels" or "vs".- Specified by:
- matchesTypein interface- IVirtualsContainer<PROPCNR extends PropCnr>
- Parameters:
- reference- The reference string of a property.
- Returns:
- true if this reference would be allowed in this virtual container, false otherwise.
 
- getVirtualizedPropFromReferenceGets a property reference from the virtuals container.- Specified by:
- getVirtualizedPropFromReferencein interface- IVirtualizedReferenceLookup
- Parameters:
- reference- The reference.
- Returns:
- The property instance, or null if not found.
 
- addVirtualInstancepublic VirtualizedItem<PROPCNR> addVirtualInstance- (IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, PROPCNR vpc, PROPCNR pc) Adds a virtualized property to the container. If the property being virtualized does not have the correct reference path for this type of container, an exception is thrown.- Specified by:
- addVirtualInstancein interface- IVirtualsContainer<PROPCNR extends PropCnr>
- Parameters:
- appGyro- The application session gyro.
- clientGyro- The client gyro session, can be- nullif not initialized from the client gyro.
- virtualSpace- The VirtualSpace used for the virtualization. When a VirtualSpace is being virtualized, it is the original non-virtualized VirtualSpace. For others, it's the virtualized VirtualSpace that causes virtualization of the instance.
- vpc- The virtualized property container.
- pc- The original property container.
- Throws:
- IllegalArgumentException- If the property containers are not of correct class or if the reference type doesn't match, or the property is a virtualized instance, the virtualized property is not virtualized, or if the property reference is already present in the virtualized properties.
 
- getVirtualContainerFromPropGets the virtual container from a property. The virtual containers are searched to see if the property is contained in any of them.- The property can be either virtualized or non-virtualized. - Specified by:
- getVirtualContainerFromPropin interface- IVirtualsContainer<PROPCNR extends PropCnr>
- Parameters:
- property- The property to verify.
- Returns:
- The VirtualizedItem that contains the property, nullfor none.
 
- getVirtualizedItemsReturns the virtualized container items.- Specified by:
- getVirtualizedItemsin interface- IVirtualsContainer<PROPCNR extends PropCnr>
- Returns:
- An array of the containers virtualized.
 
- getLockObjectGets the lock object used to manipulate VirtualizedItem's for multi-threaded and/or multi-session code such as the Application Session Gyro.- Specified by:
- getLockObjectin interface- IVirtualsContainer<PROPCNR extends PropCnr>
- Returns:
- An Object that is used to perform synchronization on.
 
- isClientSessionInstancepublic boolean isClientSessionInstance()Returns if this is an client session virtuals container that should be destroyed when the client ends or if it's an application instance.- Specified by:
- isClientSessionInstancein interface- IVirtualsContainer<PROPCNR extends PropCnr>
 
- disposepublic void dispose()Disposes of the virtuals container.- Specified by:
- disposein interface- IVirtualsContainer<PROPCNR extends PropCnr>