public interface CommonSession extends CommonProcedure, CommonHandle, CommonHandleTree, FirstLastProcedureAttribute, Sizeable
SESSION attribute or method | API |
---|---|
BATCH-MODE | isBatchMode() |
CHARSET | getCharset() |
DATE-FORMAT | getDateFormat() , setDateFormat(character) and
setDateFormat(String)
|
DISPLAY-TYPE | getDisplayType() |
HEIGHT-CHARS | emitted as getHeightChars and setHeightChars, not implemented |
HEIGHT-PIXELS | getHeightPixels() and setHeightPixels |
TEMP-DIRECTORY | getTempDirectory() |
WIDTH-CHARS | emitted as getWidthChars and setWidthChars, not implemented |
WIDTH-PIXELS | getWidthPixels() and setWidthPixels |
LAST-PROCEDURE | FirstLastProcedureAttribute.lastProcedure() |
FIRST-PROCEDURE | FirstLastProcedureAttribute.firstProcedure() |
handle.unwrapSession()
API, which, depending on the
handle's state, it either returns an SessionUtils.asHandle()
instance or a dynamic proxy using handle.invalidAttrAccessProxy
.Modifier and Type | Method and Description |
---|---|
handle |
asHandle()
Get a the instance for the SESSION system handle.
|
logical |
export(character attrList)
Method that specifies the remote procedures the client can execute
from the AppServer session
|
logical |
export(java.lang.String attrList)
Method that specifies the remote procedures the client can execute
from the AppServer session
|
handle |
firstBuffer()
Returns the handle for the first dynamic buffer in the first table containing a dynamic
buffer.
|
handle |
firstQuery()
Returns the handle for the first created dynamic query.
|
handle |
firstServer()
Get the FIRST-SERVER attribute of this session.
|
handle |
firstServerSocket()
Get the FIRST-SERVER-SOCKET attribute of this session.
|
handle |
firstSocket()
Get the FIRST-SOCKET attribute of this session.
|
character |
getCharset()
Reports the default character set name.
|
character |
getClientType()
Get the value of CLIENT-TYPE attribute, one of the following values:
Standard ABL client 4GL: CLIENT
WebClient: WEBCLIENT
AppServer agent: APPSERVER
WebSpeed agent: WEBSPEED
Other special-purpose clients: Unknown value (?)
|
character |
getDateFormat()
Gets the order of date components for conversion to/from strings.
|
character |
getDisplayType()
Gets the display type (GUI or TTY).
|
decimal |
getHeightChars()
Get the width in chars of the display.
|
integer |
getHeightPixels()
Get the height in pixels of the display.
|
integer |
getMultitaskingInterval()
Get the value of SESSION:MULTITASKING-INTERVAL attribute.
|
character |
getNumericDecimalPoint()
Get the NUMERIC-DECIMAL-POINT attribute, which is the character that represents a number's
decimal point, in its formatted representation.
|
character |
getNumericFormat()
Get the NUMERIC-FORMAT attribute, which provides the way of interpreting commas and periods
within numeric values.
|
character |
getNumericSeparator()
Get the NUMERIC-SEPARATOR attribute, which is the character that represents a number's
thousands separator, in its formatted representation.
|
character |
getParameter()
Get the value of the PARAMETER attribute, which is set to the value of the Parameter
(-param) startup parameter specified for the current session.
|
integer |
getPixelsPerColumn()
Get the PIXELS-PER-COLUMN attribute of this session.
|
integer |
getPixelsPerRow()
Get the PIXELS-PER-ROW attribute of this session.
|
integer |
getPrinterControlHandle()
Get the state of SESSION:PRINTER-CONTROL-HANLDE attribute.
|
integer |
getPrinterHDC()
Get the state of SESSION:PRINTER-HDC attribute.
|
character |
getPrinterName()
Get the state of SESSION:PRINTER-NAME attribute.
|
character |
getPrinterPort()
Get the state of SESSION:PRINTER-PORT attribute.
|
character |
getPrinters()
The SESSION:GET-PRINTERS method.
|
character |
getServerConnectionId()
Get the value of SESSION:SERVER-CONNECTION-ID attribute.
|
character |
getServerOperatingMode()
Method implementation for getting the SERVER-OPERATING-MODE attribute of
the session handle.
|
integer |
getSessionDisplayTimeZone()
Gets the
DISPLAY-TIMEZONE attribute for the user's context. |
character |
getSessionTimeSource()
Gets the
TIME-SOURCE attribute for the user's context. |
integer |
getSessionTimeZone()
Gets the SESSION:TIMEZONE used as the default offset in minutes from
UTC for this user's context.
|
character |
getStartupParameters()
Get the state of SESSION:STARTUP-PARAMETERS attribute.
|
character |
getTempDirectory()
Gets the name of the directory where temporary files are stored.
|
character |
getWaitState()
Returns a string indicating the current wait-state; valid values are:
GENERAL
COMPILER
CUSTOM - if SET-WAIT-STATE was not called with
GENERAL or
COMPILER constants.
empty string, if none of the above.
|
decimal |
getWidthChars()
Get the width in chars of the display.
|
integer |
getWidthPixels()
Get the width in pixels of the display.
|
character |
getWindowSystem()
Get the value of the WINDOW-SYSTEM attribute, which is the version on which the client was
started.
|
integer |
getWorkAreaHeightPixels()
WORK-AREA-WIDTH-PIXELS attribute for SESSION handle.
|
integer |
getWorkAreaWidthPixels()
WORK-AREA-WIDTH-PIXELS attribute for SESSION handle.
|
integer |
getWorkAreaX()
WORK-AREA-X attribute for SESSION handle.
|
integer |
getWorkAreaY()
WORK-AREA-Y attribute for SESSION handle.
|
integer |
getYearOffset()
Implementation of SESSION:YEAR-OFFSET attribute getter.
|
logical |
isBatchMode()
Reports if the current context is running in batch mode.
|
logical |
isDataEntryReturn()
Get the state of SESSION:DATA-ENTRY-RETURN attribute.
|
logical |
isDebugAlert()
Get the state of SESSION:DEBUG-ALERT attribute.
|
logical |
isImmediateDisplay()
Get the state of SESSION:IMMEDIATE-DISPLAY attribute.
|
logical |
isRemote()
Indicates if the session is an AppServer session or not.
|
logical |
isSuppressWarnings()
Get the state of SESSION:SUPPRESS-WARNINGS attribute.
|
logical |
isSystemAlertBoxes()
Get the state of SESSION:SYSTEM-ALERT-BOXES attribute.
|
logical |
isUsingAlertBoxes()
Get the state of SESSION:APPL-ALERT-BOXES attribute.
|
handle |
lastServer()
Get the LAST-SERVER attribute of this session.
|
handle |
lastServerSocket()
Get the LAST-SERVER-SOCKET attribute of this session.
|
handle |
lastSocket()
Get the LAST-SOCKET attribute of this session.
|
logical |
loadIcon(java.lang.String iconName)
Set the state of SESSION:LOAD-ICON attribute.
|
void |
setDataEntryReturn(logical on)
Set the state of SESSION:DATA-ENTRY-RETURN attribute.
|
void |
setDateFormat(character dateFormat)
Sets the order of date components for conversion to/from strings.
|
void |
setDateFormat(java.lang.String dateFormat)
Sets the order of date components for conversion to/from strings.
|
void |
setDebugAlert(logical on)
Set the state of SESSION:DEBUG-ALERT attribute.
|
void |
setHeightChars(NumberType heightChars)
Setter for HEIGHT-CHARS attribute on the SESSION handle.
|
void |
setHeightPixels(NumberType heightPixels)
Setter for HEIGHT-PIXELS attribute on the SESSION handle.
|
void |
setImmediateDisplay(boolean on)
Set the state of SESSION:IMMEDIATE-DISPLAY attribute.
|
void |
setImmediateDisplay(logical on)
Set the state of SESSION:IMMEDIATE-DISPLAY attribute.
|
void |
setMultitaskingInterval(NumberType interval)
Set the value of SESSION:MULTITASKING-INTERVAL attribute.
|
logical |
setNumericFormat(character separator,
character decPoint)
Sets the NUMERIC-SEPARATOR and NUMERIC-DECIMAL-POINT attributes simultaneously.
|
logical |
setNumericFormat(character separator,
java.lang.String decPoint)
Sets the NUMERIC-SEPARATOR and NUMERIC-DECIMAL-POINT attributes simultaneously.
|
void |
setNumericFormat(java.lang.String format)
Set the NUMERIC-FORMAT attribute.
|
logical |
setNumericFormat(java.lang.String separator,
character decPoint)
Sets the NUMERIC-SEPARATOR and NUMERIC-DECIMAL-POINT attributes simultaneously.
|
logical |
setNumericFormat(java.lang.String separator,
java.lang.String decPoint)
Sets the NUMERIC-SEPARATOR and NUMERIC-DECIMAL-POINT attributes simultaneously.
|
void |
setNumericFormat(Text format)
Set the NUMERIC-FORMAT attribute.
|
void |
setPrinterControlHandle(integer value)
Set the state of SESSION:PRINTER-CONTROL-HANLDE attribute.
|
void |
setPrinterName(character value)
Set the state of SESSION:PRINTER-NAME attribute.
|
void |
setPrinterPort(character value)
Set the state of SESSION:PRINTER-PORT attribute.
|
void |
setSessionDisplayTimeZone(NumberType displayTimezone)
Sets the
DISPLAY-TIMEZONE attribute for the user's context. |
void |
setSessionTimeSource(character timeSource)
Sets the
TIME-SOURCE attribute for the user's context. |
void |
setSessionTimeZone(NumberType offset)
Sets the SESSION:TIMEZONE used as the default offset in minutes from
UTC for this user's context.
|
void |
setSuppressWarnings(boolean value)
Set the state of SESSION:SUPPRESS-WARNINGS attribute.
|
void |
setSuppressWarnings(logical value)
Set the state of SESSION:SUPPRESS-WARNINGS attribute.
|
void |
setSystemAlertBoxes(boolean on)
Set the state of SESSION:SYSTEM-ALERT-BOXES attribute.
|
void |
setSystemAlertBoxes(logical on)
Set the state of SESSION:SYSTEM-ALERT-BOXES attribute.
|
void |
setUsesAlertBoxes(logical on)
Set the state of SESSION:APPL-ALERT-BOXES attribute.
|
logical |
setWaitState(character state)
The value of state-string determines the wait state and the type of wait cursor displayed.
|
logical |
setWaitState(java.lang.String state)
The value of state-string determines the wait state and the type of wait cursor displayed.
|
void |
setWidthChars(NumberType widthChars)
Setter for WIDTH-CHARS attribute on the SESSION handle.
|
void |
setWidthPixels(NumberType widthPixels)
Setter for WIDTH-PIXELS attribute on the SESSION handle.
|
void |
setWorkAreaHeightPixels(NumberType heightPixels)
Setter for WORK-AREA-WIDTH-PIXELS attribute on the SESSION handle.
|
void |
setWorkAreaWidthPixels(NumberType widthPixels)
Setter for WORK-AREA-WIDTH-PIXELS attribute on the SESSION handle.
|
void |
setWorkAreaX(NumberType x)
Setter for WORK-AREA-X attribute on the SESSION handle.
|
void |
setWorkAreaY(NumberType y)
Setter for WORK-AREA-Y attribute on the SESSION handle.
|
void |
setYearOffset(NumberType year)
Implementation of SESSION:YEAR-OFFSET attribute setter.
|
addSuperProcedure, addSuperProcedure, addSuperProcedure, addSuperProcedure, removeSuperProcedure, superProcedures
getResourceType, readOnlyError
id, id, unknown, valid
firstChild, lastChild
firstProcedure, lastProcedure
setHeightChars, setHeightPixels, setWidthChars, setWidthPixels
handle asHandle()
logical isBatchMode()
The value returned may have been found via a search algorithm that is account (user or process) specific or group specific within the current server or a global default for all servers.
The implementation iteratively looks up the directory node under: /server/<serverID>/runtime/<account_or_group>/batchMode
If no user/process or group nodes are present, then this is checked: /server/<serverID>/runtime/default/batchMode
If no /server/<serverID>/runtime node exists, this is checked (it is the global default area for all servers): /server/default/runtime/<account_or_group>/batchMode
Finally, if no user/process or group nodes are present in the global default area, then this is checked: /server/default/runtime/default/batchMode
If no value is found via this lookup, then the default value of
false
will be returned.
true
if the current context is in batch mode.character getCharset()
The assumption (possibly not always correct) is that UTF-8 is not a valid Progress charset and instead, to provide a proper default, we must override with a compatible charset. Note that if the default charset name is not UTF-8, it is assumed that the charset has been overriden already (at JVM startup). In that case, the default is returned unchanged.
character getDateFormat()
The order of the 3 date sub-components is a 3 character string using "M", "D" and "Y" once each. The order from index 0 to index 2 represents the left to right ordering of the components. So the leftmost date component will be defined by the character at index position 0.
The value accessed is specific to the current user's context.
void setDateFormat(java.lang.String dateFormat)
The order of the 3 date sub-components as a 3 character string using "M", "D" and "Y" once each. The order from index 0 to index 2 represents the left to right ordering of the components. So the leftmost date component will be defined by the character at index position 0.
The value set is specific to the current user's context.
dateFormat
- Defines the order of date components for conversion to/from strings.void setDateFormat(character dateFormat)
The order of the 3 date sub-components as a 3 character string using "M", "D" and "Y" once each. The order from index 0 to index 2 represents the left to right ordering of the components. So the leftmost date component will be defined by the character at index position 0.
The value set is specific to the current user's context.
dateFormat
- Defines the order of date components for conversion to/from strings.integer getYearOffset()
date.getWindowingYear()
).void setYearOffset(NumberType year)
date.getWindowingYear()
).year
- The new start year for the two-digit windowing range.integer getSessionDisplayTimeZone()
DISPLAY-TIMEZONE
attribute for the user's context.
This attribute is used for displaying DATETIME-TZ values that do not have
the timezone specified in the display format.character getDisplayType()
SESSION:DISPLAY-TYPE
system handle attribute.decimal getWidthChars()
SESSION:WIDTH-CHARS
system handle attribute.getWidthChars
in interface Sizeable
void setWidthChars(NumberType widthChars)
setWidthChars
in interface Sizeable
widthChars
- Attribute value.integer getWidthPixels()
SESSION:WIDTH-PIXELS
system handle attribute.getWidthPixels
in interface Sizeable
void setWidthPixels(NumberType widthPixels)
setWidthPixels
in interface Sizeable
widthPixels
- Attribute value.decimal getHeightChars()
SESSION:HEIGHT-CHARS
system handle attribute.getHeightChars
in interface Sizeable
void setHeightChars(NumberType heightChars)
setHeightChars
in interface Sizeable
heightChars
- Attribute value.integer getHeightPixels()
SESSION:HEIGHT-PIXELS
system handle attribute.getHeightPixels
in interface Sizeable
void setHeightPixels(NumberType heightPixels)
setHeightPixels
in interface Sizeable
heightPixels
- Attribute value.character getTempDirectory()
SESSION:TEMP-DIRECTORY
system
handle attribute.integer getSessionTimeZone()
character getSessionTimeSource()
TIME-SOURCE
attribute for the user's context.
This attribute is can be read and written but it is not honored for date/time processing in
P2J. The intention of the attribute is to define the system from which time values will be
obtained. In P2J, time values are always obtained from the application server.logical export(java.lang.String attrList)
attrList
- The list of procedure and name-patterns separated by comma to be
exported.true
if REMOTE attribute is true and operation succeeded or
false
otherwiselogical export(character attrList)
attrList
- The list of procedure and name-patterns separated by comma to be
exported.true
if REMOTE attribute is true and operation succeeded or
false
otherwisecharacter getServerOperatingMode()
Possible values:
logical isRemote()
isRemote
in interface CommonProcedure
true
if the current session is an AppServer session
or false otherwise.character getClientType()
handle firstQuery()
handle firstServer()
handle firstServerSocket()
handle firstSocket()
handle firstBuffer()
character getNumericSeparator()
character getNumericDecimalPoint()
character getNumericFormat()
The possible values are "American", "European" or a character string consisting of the thousands separator followed by the decimal point. This attribute provides the same functionality as the European Numeric Format (-E) parameter.
void setNumericFormat(java.lang.String format)
getNumericFormat()
for its representation.format
- The new value.void setNumericFormat(Text format)
getNumericFormat()
for its representation.format
- The new value.character getParameter()
character getWindowSystem()
character getWaitState()
GENERAL
or
COMPILER
constants.logical setNumericFormat(java.lang.String separator, java.lang.String decPoint)
separator
- The new NUMERIC-SEPARATOR value.decPoint
- The new NUMERIC-DECIMAL-POINT value.true
if the operation was successful.logical setNumericFormat(character separator, java.lang.String decPoint)
separator
- The new NUMERIC-SEPARATOR value.decPoint
- The new NUMERIC-DECIMAL-POINT value.true
if the operation was successful.logical setNumericFormat(java.lang.String separator, character decPoint)
separator
- The new NUMERIC-SEPARATOR value.decPoint
- The new NUMERIC-DECIMAL-POINT value.true
if the operation was successful.logical setNumericFormat(character separator, character decPoint)
separator
- The new NUMERIC-SEPARATOR value.decPoint
- The new NUMERIC-DECIMAL-POINT value.true
if the operation was successful.logical setWaitState(java.lang.String state)
state
- The new wait-state value.true
if the operation was successful.logical setWaitState(character state)
state
- The new wait-state value.true
if the operation was successful.handle lastServer()
handle lastServerSocket()
handle lastSocket()
integer getPixelsPerRow()
integer getPixelsPerColumn()
integer getWorkAreaX()
void setWorkAreaX(NumberType x)
x
- Attribute value.integer getWorkAreaY()
void setWorkAreaY(NumberType y)
y
- Attribute value.integer getWorkAreaWidthPixels()
void setWorkAreaWidthPixels(NumberType widthPixels)
widthPixels
- Attribute value.integer getWorkAreaHeightPixels()
void setWorkAreaHeightPixels(NumberType heightPixels)
heightPixels
- Attribute value.logical isDebugAlert()
void setDebugAlert(logical on)
on
- The new state for SESSION:DEBUG-ALERT attribute.logical isDataEntryReturn()
void setDataEntryReturn(logical on)
on
- The new state for SESSION:DATA-ENTRY-RETURN attribute.logical isUsingAlertBoxes()
void setUsesAlertBoxes(logical on)
on
- The new state for SESSION:APPL-ALERT-BOXES attribute.logical loadIcon(java.lang.String iconName)
iconName
- The file name of the icon to be loadedcharacter getPrinterName()
void setPrinterName(character value)
value
- The new state for SESSION:PRINTER-NAME attribute.character getPrinterPort()
void setPrinterPort(character value)
value
- The new state for SESSION:PRINTER-PORT attribute.integer getPrinterControlHandle()
void setPrinterControlHandle(integer value)
value
- The new state for SESSION:PRINTER-CONTROL-HANLDE attribute.integer getPrinterHDC()
character getPrinters()
logical isSuppressWarnings()
void setSuppressWarnings(logical value)
value
- The new state for SESSION:SUPPRESS-WARNINGS attribute.void setSuppressWarnings(boolean value)
value
- The new state for SESSION:SUPPRESS-WARNINGS attribute.character getStartupParameters()
void setSessionTimeZone(NumberType offset)
offset
- The new timezone offset which must be between -840 and 840 inclusive.
The value may also be unknown
which is the equivalent of resetting
this attribute to the default.void setSessionTimeSource(character timeSource)
TIME-SOURCE
attribute for the user's context.
This attribute is can be read and written but it is not honored for date/time processing in
P2J. The intention of the attribute is to define the system from which time values will be
obtained. In P2J, time values are always obtained from the application server.timeSource
- The new value to set. If null
, then the empty string will be used,
which in the 4GL has the same affect as "local".void setSessionDisplayTimeZone(NumberType displayTimezone)
DISPLAY-TIMEZONE
attribute for the user's context.
This attribute is used for displaying DATETIME-TZ values that do not have
the timezone specified in the display format.displayTimezone
- The new value to set.logical isImmediateDisplay()
void setImmediateDisplay(logical on)
on
- The new state for SESSION:IMMEDIATE-DISPLAY attribute.void setImmediateDisplay(boolean on)
on
- The new state for SESSION:IMMEDIATE-DISPLAY attribute.void setSystemAlertBoxes(boolean on)
on
- The new state for SESSION:SYSTEM-ALERT-BOXES attribute.void setSystemAlertBoxes(logical on)
on
- The new state for SESSION:SYSTEM-ALERT-BOXES attribute.logical isSystemAlertBoxes()
void setMultitaskingInterval(NumberType interval)
interval
- The new value of SESSION:MULTITASKING-INTERVAL attribute.integer getMultitaskingInterval()
character getServerConnectionId()