Package com.iizix.term.prop
Class HostSessionProps
- java.lang.Object
- com.iizix.prop.GProp<java.lang.Object>
- com.iizix.term.prop.HostSessionProps
- All Implemented Interfaces:
EventListener
,IGProp<java.lang.Object>
,java.lang.Cloneable
public class HostSessionProps extends GProp<java.lang.Object>
This property handles communication between the server and client in full duplex using Transaction's. It is NOT persistent.- Author:
- Christopher Mindus
Field Summary
Fields Modifier and Type Field Description static int
M_GET
static int
M_REMOVE
static int
M_SELALL
static int
T_ACCEPT
static int
T_ALARM
static int
T_ALLOWEDCHARS
static int
T_CHAR
static int
T_CLEAR
static int
T_CLEARTYPEAH
static int
T_CLEARTYPEAH_NOEDIT
static int
T_CLIENTINPUT
static int
T_CLIENTSCREEN
static int
T_CLIPBOARD
static int
T_CURSOR
static int
T_CURSOR2
static int
T_ERRORSTATE
static int
T_FIELDS_POPUPS
static int
T_FLUSH
static int
T_FONTS
static int
T_KEY
static int
T_LFE_CHAR
static int
T_MARK
static int
T_PRTWIN
static int
T_RESET
static int
T_SCREEN
static int
T_SIZE
static int
T_STATE
static int
T_VK
Transaction codes.Fields inherited from class com.iizix.prop.GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_USER_1, PROP_USER_2
Fields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
Constructor Summary
Constructors Constructor Description HostSessionProps()
Creates the HostSessionProps property without a name.HostSessionProps(Atom propertyAtom)
Creates the HostSessionProps property with the specified name.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SendTransaction trans)
Queues a transaction for execution on the remote side whenever possible.void
addPreSendListener(IPreSendHostSessionProps listener)
Adds a pre-send event listener.protected void
appendPropValue(PropMgr propertyManager, SendTransaction trans, java.lang.Object value)
Appends the property value and all its children to a transaction using theAtomManager
.HostSessionProps
clone()
Clones the property is NOT ALLOWED, thus a CloneNotSupportedException is always thrown.void
flagEvent()
Flag this property value as changed.ReadTransaction
get()
Gets the next read-transaction.protected java.lang.Object
getPropValue0(java.lang.Object value, int index)
Gets the property value in another class form than the "native" one.java.lang.Class<?>[]
getValueClasses()
Gets the list of possible native Java classes that can be used to set a value usingsetPropertyValue
, in order of importance.boolean
initializeValue(PropMgr propertyManager, ReadTransaction trans)
Initializes the property value from a transaction.void
removePreSendListener(IPreSendHostSessionProps listener)
Removes a pre-send event listener.protected java.lang.Object
toNativeValue0(java.lang.Object value, int index)
Tries conversion of possibly accepted properties values using thesetPropertyValue
method into the most preferred property value type.void
validatePropType(java.lang.Object newValue)
Validates the newValue against the property object type.Methods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalsTree, equalValues, extendsClone, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferences, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParent, getTreeLock, getVSReference, hasChanged, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeElement, initializeGElement, initializeGProp, initializeProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropPrivateAtCreation, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, list, list, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onEventSelf, onPrepare, onPropDispose, onPropInvalidateCache, onPropParentChanged, onPropTreeInitialized, onPropValueSet, onReferenceEvent, onRemoteEvent, onVirtualizationCompleted, onVirtualized, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setCreateRequiredProp, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toElementString, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropValue, verify, verifyHasPropertyItem, virtualize, warning, warning, warning
Field Detail
T_VK
public static final int T_VK
Transaction codes.- See Also:
- Constant Field Values
T_CHAR
public static final int T_CHAR
- See Also:
- Constant Field Values
T_SIZE
public static final int T_SIZE
- See Also:
- Constant Field Values
T_CURSOR
public static final int T_CURSOR
- See Also:
- Constant Field Values
T_RESET
public static final int T_RESET
- See Also:
- Constant Field Values
T_CURSOR2
public static final int T_CURSOR2
- See Also:
- Constant Field Values
T_SCREEN
public static final int T_SCREEN
- See Also:
- Constant Field Values
T_CLIPBOARD
public static final int T_CLIPBOARD
- See Also:
- Constant Field Values
T_MARK
public static final int T_MARK
- See Also:
- Constant Field Values
T_KEY
public static final int T_KEY
- See Also:
- Constant Field Values
T_FONTS
public static final int T_FONTS
- See Also:
- Constant Field Values
T_CLIENTINPUT
public static final int T_CLIENTINPUT
- See Also:
- Constant Field Values
T_LFE_CHAR
public static final int T_LFE_CHAR
- See Also:
- Constant Field Values
T_PRTWIN
public static final int T_PRTWIN
- See Also:
- Constant Field Values
T_CLIENTSCREEN
public static final int T_CLIENTSCREEN
- See Also:
- Constant Field Values
T_FLUSH
public static final int T_FLUSH
- See Also:
- Constant Field Values
T_ACCEPT
public static final int T_ACCEPT
- See Also:
- Constant Field Values
T_ALLOWEDCHARS
public static final int T_ALLOWEDCHARS
- See Also:
- Constant Field Values
T_ERRORSTATE
public static final int T_ERRORSTATE
- See Also:
- Constant Field Values
T_CLEARTYPEAH_NOEDIT
public static final int T_CLEARTYPEAH_NOEDIT
- See Also:
- Constant Field Values
T_CLEARTYPEAH
public static final int T_CLEARTYPEAH
- See Also:
- Constant Field Values
T_STATE
public static final int T_STATE
- See Also:
- Constant Field Values
T_ALARM
public static final int T_ALARM
- See Also:
- Constant Field Values
T_FIELDS_POPUPS
public static final int T_FIELDS_POPUPS
- See Also:
- Constant Field Values
T_CLEAR
public static final int T_CLEAR
- See Also:
- Constant Field Values
M_REMOVE
public static final int M_REMOVE
- See Also:
- Constant Field Values
M_SELALL
public static final int M_SELALL
- See Also:
- Constant Field Values
M_GET
public static final int M_GET
- See Also:
- Constant Field Values
Constructor Detail
HostSessionProps
public HostSessionProps()
Creates the HostSessionProps property without a name. The name must be set in all cases using thesetPropertyAtom
call.
HostSessionProps
public HostSessionProps(Atom propertyAtom)
Creates the HostSessionProps property with the specified name. All system-reserved names for components begins with "$".- Parameters:
propertyAtom
- the name of the component, unique within it's parent.
Method Detail
clone
public HostSessionProps clone() throws java.lang.CloneNotSupportedException
Clones the property is NOT ALLOWED, thus a CloneNotSupportedException is always thrown.
validatePropType
public void validatePropType(java.lang.Object newValue) throws PropTypeException
Validates the newValue against the property object type. Subclasses must override this method to perform optional value type validation.Note: When this method is called, synchronization is done at the property itself, so no synchronization on the tree should be done.
- Specified by:
validatePropType
in interfaceIGProp<java.lang.Object>
- Specified by:
validatePropType
in classGProp<java.lang.Object>
- Parameters:
newValue
- The new value to set.- Throws:
PropTypeException
- when the new value isn't of the correct class.
getValueClasses
public java.lang.Class<?>[] getValueClasses()
Gets the list of possible native Java classes that can be used to set a value usingsetPropertyValue
, in order of importance. Only one is supported, the Object class.- Specified by:
getValueClasses
in interfaceIGProp<java.lang.Object>
- Specified by:
getValueClasses
in classGProp<java.lang.Object>
- Returns:
- An array Java class of length 1 containing the Object class.
getPropValue0
protected java.lang.Object getPropValue0(java.lang.Object value, int index)
Description copied from class:GProp
Gets the property value in another class form than the "native" one. This method tries conversion of a "native" property value into another class type. This method is used when filling in a POJO variable (Plain Old Java Object Field) from a "native" property value.Subclasses overrides this method
getPropertyValue0
in order to provide the appropriate conversion.- Specified by:
getPropValue0
in classGProp<java.lang.Object>
- Parameters:
value
- The property value.index
- The index in the Class array returned bygetValueClasses()
.- Returns:
- The property value in the requested class, after conversion.
toNativeValue0
protected java.lang.Object toNativeValue0(java.lang.Object value, int index)
Description copied from class:GProp
Tries conversion of possibly accepted properties values using thesetPropertyValue
method into the most preferred property value type. If the input value already is of the preferred type, the same object is returned.Subclasses overrides the method
toNativeValue0
in order to provide the appropriate conversion.- Specified by:
toNativeValue0
in classGProp<java.lang.Object>
- Parameters:
value
- The input value to convert to native value.index
- The index in the array returned bygetValueClasses()
, or -1 if not found.- Returns:
- The converted input value in the preferred property value object type.
addPreSendListener
public void addPreSendListener(IPreSendHostSessionProps listener)
Adds a pre-send event listener.- Parameters:
listener
- The listener.
removePreSendListener
public void removePreSendListener(IPreSendHostSessionProps listener)
Removes a pre-send event listener.- Parameters:
listener
- The listener.
flagEvent
public void flagEvent()
Flag this property value as changed.
appendPropValue
protected void appendPropValue(PropMgr propertyManager, SendTransaction trans, java.lang.Object value)
Appends the property value and all its children to a transaction using theAtomManager
.- Specified by:
appendPropValue
in classGProp<java.lang.Object>
- Parameters:
propertyManager
- the property manager instance.trans
- transaction to append the properties to.value
- the value to append to the transaction, a reference to the current property value.
initializeValue
public boolean initializeValue(PropMgr propertyManager, ReadTransaction trans) throws PropException
Initializes the property value from a transaction.- Specified by:
initializeValue
in classGProp<java.lang.Object>
- Parameters:
propertyManager
- the property manager.trans
- the transaction to initialize the property with.- Returns:
- true if any data has been added, false otherwise.
- Throws:
PropException
- In case of transaction error.
get
public ReadTransaction get()
Gets the next read-transaction.- Returns:
- A transaction to process or null if no more transactions are present.
add
public void add(SendTransaction trans)
Queues a transaction for execution on the remote side whenever possible.- Parameters:
trans
- The transaction to perform.