public class ClientSession
extends java.lang.Object
Constructor and Description |
---|
ClientSession(ClientMainFrame mainframe,
PageActionManager.ActionSourceTransformer transformer,
java.lang.String urltoconnecto,
java.lang.String questionmarkicon)
creates a client session and sets up a display that will show the specified
URL
|
Modifier and Type | Method and Description |
---|---|
void |
addNewDisplay()
adds a new empty display
|
DisplayPageFeedback |
displayPage(ClientDisplay activedisplay,
long starttime,
boolean showtechdetails,
java.lang.String module,
java.lang.String action,
boolean openinnewtab) |
DisplayPageFeedback |
enrichPageWithInlineData(CPage page,
ClientDisplay activedisplay,
long starttime,
boolean showtechdetails,
java.lang.String module,
java.lang.String action) |
ClientDisplay |
getActiveClientDisplay() |
ClientData |
getClientData() |
javafx.scene.control.TabPane |
getClientSessionNode() |
ConnectionToServer |
getConnectionToServer() |
java.lang.String |
getLocale() |
ClientMainFrame |
getMainFrame() |
static void |
printException(java.lang.Exception e) |
void |
sendaction(java.lang.String actionname,
java.lang.String modulename,
CActionData actionattributes,
boolean openinnewtab)
sends an action that will result in the display of a new page
|
void |
sendInlineAction(java.lang.String actionname,
java.lang.String modulename,
CActionData actionattributes,
CPage page) |
void |
sendLink(java.lang.String address,
boolean back)
displays in the current tab the page with the address specified
|
void |
setBusinessScreenFrozen(boolean frozen) |
void |
setShowTechDetails(boolean techdetails)
sets the show tech details parameter (memory usage, speed of page display,
network capacity used
|
void |
setTitle(java.lang.String newtitle)
sets the title on the active tab (corresponding to the active client display)
|
void |
stopconnection()
Stops the current connection
|
void |
treatException(java.lang.Exception e)
Logs and displays on status bar an error
|
public ClientSession(ClientMainFrame mainframe, PageActionManager.ActionSourceTransformer transformer, java.lang.String urltoconnecto, java.lang.String questionmarkicon)
mainframe
- parent main frame of the applicationtransformer
- action source transformer for event handlerurltoconnecto
- first URL to connect to, null if not usedquestionmarkicon
- question mark icon URLpublic java.lang.String getLocale()
public javafx.scene.control.TabPane getClientSessionNode()
public ConnectionToServer getConnectionToServer()
public void setTitle(java.lang.String newtitle)
newtitle
- the text title to showpublic void setShowTechDetails(boolean techdetails)
techdetails
- true to show tech details, false elsepublic void addNewDisplay()
public ClientMainFrame getMainFrame()
public ClientData getClientData()
public void sendInlineAction(java.lang.String actionname, java.lang.String modulename, CActionData actionattributes, CPage page)
actionname
- name of the action to launchmodulename
- nae of the module to launchlocal
- true if the inline action is localactionattributes
- list of attributes for the inline actionpage
- page to show the data coming back from the inline
actionpublic void sendaction(java.lang.String actionname, java.lang.String modulename, CActionData actionattributes, boolean openinnewtab)
actionname
- name of the actionmodulename
- name of the moduleactionattributes
- attributes that will be sent to the server for the
actionopeninnewtab
- true if the new page should be opened in a new tab,
keeping the current page in the current tabpublic void sendLink(java.lang.String address, boolean back)
address
- the address to showback
- true if back is possiblepublic DisplayPageFeedback enrichPageWithInlineData(CPage page, ClientDisplay activedisplay, long starttime, boolean showtechdetails, java.lang.String module, java.lang.String action) throws java.io.IOException, OLcRemoteException
page
- current pageactivedisplay
- client display for the actionstarttime
- start time of the interaction with the server (for
performance audit purposes)showtechdetails
- true if all technical details (memory, speed of
request, network bandwidth used)module
- name of the moduleaction
- name of the line actionjava.io.IOException
- if any network breadkownOLcRemoteException
- if anythink bad happened on the server during the
requestpublic DisplayPageFeedback displayPage(ClientDisplay activedisplay, long starttime, boolean showtechdetails, java.lang.String module, java.lang.String action, boolean openinnewtab) throws java.io.IOException, OLcRemoteException
activedisplay
- current displaystarttime
- start time of the exchange with the servershowtechdetails
- true to show tech detailsmodule
- name of the moduleaction
- name of the actionopeninnewtab
- true to open in new tabsjava.io.IOException
- if any network breadkownOLcRemoteException
- if anythink bad happened on the server during the
requestpublic ClientDisplay getActiveClientDisplay()
public void treatException(java.lang.Exception e)
e
- exceptin to treadpublic static void printException(java.lang.Exception e)
public void setBusinessScreenFrozen(boolean frozen)
frozen
- true if widgets should be frozen as one communication is
already happening in the serverpublic void stopconnection()