Package com.iizix.server.app
Interface IVirtualsContainer<PROPCNR extends PropCnr>
- All Superinterfaces:
IVirtualizedReferenceLookup
- All Known Implementing Classes:
VirtualsContainer
The interface to the virtualized container that is exposed to the API and the Server. The underlying implementation is internal.
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptionaddVirtualInstance
(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 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.boolean
Returns 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.Methods inherited from interface com.iizix.server.app.IVirtualizedReferenceLookup
getVirtualizedPropFromReference
Method Details
matchesType
Verifies 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".- Parameters:
reference
- The reference string of a property.- Returns:
- true if this reference would be allowed in this virtual container, false otherwise.
addVirtualInstance
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.- Parameters:
appGyro
- The application session gyro.clientGyro
- The client gyro session, can benull
if 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.
getVirtualContainerFromProp
Gets 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.
- Parameters:
property
- The property to verify.- Returns:
- The VirtualizedItem that contains the property,
null
for none.
getVirtualizedItems
VirtualizedItem<PROPCNR>[] getVirtualizedItems()Returns the virtualized container items.- Returns:
- An array of the containers virtualized.
getLockObject
Object getLockObject()Gets the lock object used to manipulate VirtualizedItem's for multi-threaded and/or multi-session code such as the Application Session Gyro.- Returns:
- An Object that is used to perform synchronization on.
isClientSessionInstance
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.dispose
void dispose()Disposes of the virtuals container.