BBjThinClient

Description

The BBjThinClient API exposes various methods that interact with the client machine in a thin client environment.

Creation

BBjAPI > BBjThinClient

BBjThinClient may be obtained through the following BBjAPI object method:

Return Value

Method

BBjThinClient

getThinClient()

Methods of BBjThinClient

Return Value

Method

void

browse(string url)

void

browse(string url, string name, string features)

void

clearUserProperties()

clearUserProperties(long group)

int

clientExec(BBjVector commandLine!)

clientExec(BBjVector  commandLine!, string workingDir)

clientExec(string commandString)

clientExec(string commandString, string workingDir)

string

getClientBBjVersion()

string

getClientBuildDate()

BBjClientFileSystem

getClientFileSystem()

string

getClientIPAddress()

string

getClientJavaVersion()

string

getClientLocale()

BBjVector getClientLocales()

string

getClientName()

string

getClientOSName()

string

getClientOSVersion()

string

getClientPortID()

java.util.TimeZone

getClientTimeZone()

string

getPublicIPAddress()

Map

getUserProperties()

getUserProperties(Collection  properties)

getUserProperties(long group)

getUserProperties(long group, Collection  properties)

string

getUserProperty(long group, string key)

getUserProperty(string key)

boolean

isInServerJVM()

void

setClientTimeZone(java.util.TimeZone clientTimeZone)

void setUserProperties(Map map)
void setUserProperties(long group, Mapmap)
void setUserProperties(long group, String attributes, Map map)
void setUserProperty(long group, String attributes, String key, String value)
void setUserProperty(long group, String key, String value)
void setUserProperty(String key, String value)

BUI logoDWC logoRemarks

Browser security restrictions and differences between Java and JavaScript impose some limitations on the BUI and DWC implementations of this API. See Interacting with client files in BUI and DWC for a detailed discussion of the browser-based BBjThinClient API.

Constants

Value Constant Type
0

USER_PROPERTIES_COOKIES

long
1

USER_PROPERTIES_STORAGE

long
-1

USER_PROPERTIES_SESSION

long
""

SAME_SITE_DEFAULT

String
"Lax"

SAME_SITE_LAX

String
"None"

SAME_SITE_NONE

String
"Strict"

SAME_SITE_STRICT

String

Example

rem ' BBjThinClient
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(0,0,600,750,"BBjThinClient",$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
thinclient! = window!.addButton(1,25,25,125,25,"getThinClient",$$)
thinclient!.setCallback(thinclient!.ON_BUTTON_PUSH,"thinclient")
reset! = window!.addButton(2,200,25,125,25,"Reset",$$)
reset!.setCallback(reset!.ON_BUTTON_PUSH,"reset")
process_events
eoj:
  release
reset:
  for i=101 to 113
    window!.getControl(i,err=*next).destroy()
  next i
return
thinclient:
  gosub reset
  tc! = bbjapi().getThinClient()
  rem ' /argv
  property$ = "argv"
  property! = window!.addStaticText(101,25,75,550,25,property$,$$)
  property!.setStyle("overflow-wrap","break-word")
  property$ = property$ + ":"
  t = tim
  if argc > 1 then
     for i = 1 to argc-1
     property$ = property$ + " "+argv(i)
     next i
  endif
  t = tim - t
  property$ = property$ + ": "+str(t*3600000)+" ms"
  property!.setText(property$)
  rem ' getClientBBjVersion
  property$ = "getClientBBjVersion"
  property! = window!.addStaticText(102,25,125,550,25,property$,$$)
  t = tim
  property$ = property$ + ": "+tc!.getClientBBjVersion()
  t = tim - t
  property$ = property$ + ": "+str(t*3600000)+" ms"
  property!.setText(property$)
  rem ' getClientBuildDate
  property$ = "getClientBuildDate"
  property! = window!.addStaticText(103,25,175,550,25,property$,$$)
  t = tim
  property$ = property$ + ": "+tc!.getClientBuildDate()
  t = tim - t
  property$ = property$ + ": "+str(t*3600000)+" ms"
  property!.setText(property$)
  rem ' getClientIPAddress
  property$ = "getClientIPAddress"
  property! = window!.addStaticText(104,25,225,550,25,property$,$$)
  t = tim
  property$ = property$ + ": "+tc!.getClientIPAddress()
  t = tim - t
  property$ = property$ + ": "+str(t*3600000)+" ms"
  property!.setText(property$)
  rem ' getClientJavaVersion
  property$ = "getClientJavaVersion"
  property! = window!.addStaticText(105,25,275,550,25,property$,$$)
  t = tim
  property$ = property$ + ": "+tc!.getClientJavaVersion()
  t = tim - t
  property$ = property$ + ": "+str(t*3600000)+" ms"
  property!.setText(property$)
  rem ' getClientLocale
  property$ = "getClientLocale"
  property! = window!.addStaticText(106,25,325,550,25,property$,$$)
  t = tim
  property$ = property$ + ": "+tc!.getClientLocale()
  t = tim - t
  property$ = property$ + ": "+str(t*3600000)+" ms"
  property!.setText(property$)
  rem ' getClientLocales
  property$ = "getClientLocales"
  property! = window!.addStaticText(107,25,375,550,25,property$,$$)
  t = tim
  property$ = property$ + ": "+str(tc!.getClientLocales())
  t = tim - t
  property$ = property$ + ": "+str(t*3600000)+" ms"
  property!.setText(property$)
  rem ' getClientName
  property$ = "getClientName"
  property! = window!.addStaticText(108,25,425,550,25,property$,$$)
  t = tim
  property$ = property$ + ": "+tc!.getClientName()
  t = tim - t
  property$ = property$ + ": "+str(t*3600000)+" ms"
  property!.setText(property$)
  rem ' getClientOSName
  property$ = "getClientOSName"
  property! = window!.addStaticText(109,25,475,550,25,property$,$$)
  t = tim
  property$ = property$ + ": "+tc!.getClientOSName()
  t = tim - t
  property$ = property$ + ": "+str(t*3600000)+" ms"
  property!.setText(property$)
  rem ' getClientOSVersion
  property$ = "getClientOSVersion"
  property! = window!.addStaticText(110,25,525,550,25,property$,$$)
  t = tim
  property$ = property$ + ": "+tc!.getClientOSVersion()
  t = tim - t
  property$ = property$ + ": "+str(t*3600000)+" ms"
  property!.setText(property$)
  rem ' getClientPortID
  property$ = "getClientPortID"
  property! = window!.addStaticText(111,25,575,550,25,property$,$$)
  t = tim
  property$ = property$ + ": "+tc!.getClientPortID()
  t = tim - t
  property$ = property$ + ": "+str(t*3600000)+" ms"
  property!.setText(property$)
  rem ' getPublicIPAddress
  property$ = "getPublicIPAddress"
  property! = window!.addStaticText(112,25,625,550,25,property$,$$)
  t = tim
  property$ = property$ + ": "+tc!.getPublicIPAddress()
  t = tim - t
  property$ = property$ + ": "+str(t*3600000)+" ms"
  property!.setText(property$)
  rem ' getClientTimeZone
  property$ = "getClientTimeZone"
  property! = window!.addStaticText(113,25,675,550,350,property$,$$)
  property!.setStyle("overflow-wrap","break-word")
  t = tim
  property$ = property$ + ": "+str(tc!.getClientTimeZone())
  t = tim - t
  property$ = property$ + ": "+str(t*3600000)+" ms"
  property!.setText(property$)
return

See Also

BBjAPI

BBj Object Variables

BBj Object Creation and Assignment

BBj Object Error Handling

BBj Object Operators

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.