public class SessionManager extends Object implements NetPhantomConstants, Runnable, ClientSessionManagerInterface
Modifier and Type | Class and Description |
---|---|
class |
SessionManager.Session
This class handles all panels in a panel session.
|
Modifier and Type | Field and Description |
---|---|
Container |
rootFrame
The root frame window.
|
Terminal |
terminal
The single terminal window instance.
|
ACTION_CLOSEWINDOW, ACTION_CONTROL, ACTION_HOSTKEY, ACTION_MENU, ACTION_NONE, ACTION_NOTEBOOKPAGE, ACTION_POPUPMENU, CC_BACKGROUND, CC_BOTH, CC_FOREGROUND, CC_NONE, CLIPBOARD_GET, CLIPBOARD_SET, DATEF_DMY, DATEF_MDY, DATEF_SYSTEM, DATEF_YMD, DDE_ADVISE, DDE_EXECUTE, DDE_INITIATE, DDE_POKE, DDE_REQUEST, DDE_TERMINATE, DDE_UNADVISE, DDE_UPDATE, DDEVAR_DISABLE, DDEVAR_ENABLE, DDEVAR_REQUEST, DDEVAR_SET, DDEVAR_VALIDATE, EFT_AMOUNT, EFT_DATE, EFT_DATEAMOUNT, EFT_NORMAL, EFT_PASSWORD, EVENT_CHAR, EVENT_CHECK, EVENT_CLICK, EVENT_COMMAND, EVENT_DBLCLICK, EVENT_DDECONNECTION, EVENT_DDEDATA, EVENT_DDEERROR, EVENT_DDEEXECUTE, EVENT_DDEINVALIDATE, EVENT_DDEPOKE, EVENT_DDEREQUEST, EVENT_DEFOCUS, EVENT_FOCUS, EVENT_PAGEDOWN, EVENT_PAGEUP, EVENT_SELECT, EVENT_UNKNOWN, EVENT_USERCHANGE, EXTENDEDINFO_IDS_TO_CLIENT, FOCUSTYPE_CLIENTTARGET, FOCUSTYPE_CONTROL, FOCUSTYPE_NONE, ICON_CRITICAL, ICON_INFORMATION, ICON_NOICON, ICON_QUERY, ICON_WARNING, J_AUTO, J_BOTTOM, J_BOTTOMLEFT, J_BOTTOMRIGHT, J_CENTER, J_LEFT, J_RIGHT, J_TOP, J_TOPLEFT, J_TOPRIGHT, MAX_PANELS_PER_SESSION, MAX_SESSIONS, MB_ABORTRETRYIGNORE, MB_CANCEL, MB_ENTER, MB_ENTERCANCEL, MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_YESNO, MB_YESNOCANCEL, MBID_CANCEL, MBID_DEFAULT, MBID_ENTER, MBID_IGNORE, MBID_NO, MBID_OK, MBID_RETRY, MBID_YES, MS_MOVE, MS_NONE, MS_SIZE, NETPHANTOM_COPYRIGHT, NETPHANTOM_COPYRIGHT2, NETPHANTOM_VERSION, OBJEVENT_CHECK, OBJEVENT_CLICK, OBJEVENT_DBLCLICK, OBJEVENT_DEFOCUS, OBJEVENT_FOCUS, OBJEVENT_SELECT, OBJEVENT_USERCHANGE, PANELCREATE_APPPANEL, PANELCREATE_DANGLINGPANEL, PANELCREATE_DLGFRAME, PANELCREATE_EXTENDEDINFO, PANELCREATE_ICON, PANELCREATE_INDIVIDUALSIZE, PANELCREATE_POPUP, REPLYTYPE_CLIENTEXECUTE, REPLYTYPE_CLIPBOARD, REPLYTYPE_DDE, REPLYTYPE_FFONTLIST, REPLYTYPE_MESSAGEBOX, REPLYTYPE_REPORT, REPLYTYPE_SAVEPROPS, REPLYTYPE_TERMMARK, RPRT_CANCELPRINTJOB, RPRT_CLOSEPRINTJOB, RPRT_CONTPRINTJOB, RPRT_OPENPRINTJOB, RPRT_PRINTJOBCANCLD, RPRT_PRINTJOBCLOSED, RPRT_PRINTJOBCONT, RPRT_PRINTJOBOPENED, RPRT_PRINTJOBSTARTED, RPRT_STARTPRINTJOB, SELMODE_NORMAL, SELMODE_NOTALLOWED, SELMODE_REQUIRED, SELTYPE_MULTIPLE, SELTYPE_SINGLE, SEPARATOR, SEPARATORCHAR, TRANS_APPLICATIONCHANGE, TRANS_CALLOBJECT, TRANS_CANCELEXIT, TRANS_CLEARLOCK, TRANS_CLIENTEXECUTE, TRANS_CLIENTJARS, TRANS_CLIENTTEXTTABLE, TRANS_CLIENTUPDATED, TRANS_CLIENTUPDATEDNOLOCK, TRANS_CLIPBOARD, TRANS_CLIPBOARDCOMPONENT, TRANS_CLOSETERMINALWINDOW, TRANS_CONNECTIONREFUSED, TRANS_COUNTRYINFO, TRANS_CREATEPANEL, TRANS_CREATESESSION, TRANS_DDE, TRANS_DDEEVENT, TRANS_DDEEVENTREPLY, TRANS_DDEVAREVENT, TRANS_DISPLAYHELP, TRANS_DISPLAYTERMINAL, TRANS_DISPLAYTOOLTIPS, TRANS_ENDCONVERSATION, TRANS_EXIT, TRANS_FONTSUBSTITUTION, TRANS_HOSTCOLORTABLE, TRANS_HOSTPRINT, TRANS_HWND, TRANS_INACTIVESESSION, TRANS_INITIATE, TRANS_KEEPALIVE, TRANS_LOCALE, TRANS_LOGEVENT, TRANS_MESSAGEBOX, TRANS_MESSAGEBOXWITHREPLY, TRANS_MODALREPLY, TRANS_MULTTERM, TRANS_PING, TRANS_PRINTCOMPONENT, TRANS_PRINTPANEL, TRANS_PRINTREPORT, TRANS_PRTWINKEY, TRANS_RECONNECT, TRANS_REDIRECTION, TRANS_REMOVEPANELATLEVEL, TRANS_REMOVETERMINAL, TRANS_RENEGOTIATESSL, TRANS_REQUESTHELP, TRANS_RESOURCEURL, TRANS_SELECTSESSION, TRANS_SESSIONACTIVE, TRANS_SESSIONSELECTED, TRANS_SETCOLORS, TRANS_SETFOCUS, TRANS_SETLOCK, TRANS_SETPANELNESTLEVEL, TRANS_SETUPPARAMS, TRANS_SHOWDOCUMENT, TRANS_SOCKET, TRANS_SOUNDALARM, TRANS_STARTUPINFO, TRANS_STOPSESSION, TRANS_TERMINALDATA, TRANS_TERMINALUPDATE, TRANS_TERMINALWINDOW, TRANS_TERMWINTEXT, TRANS_UPDATEAPPLICATION, TRANS_UPDATEPANEL, TRANS_USEREXITPRTKEY, TRANSACTION_VERSION, TS_CLOSE, TS_DATA, TS_ERROR, TS_OPEN, VSIGN_MINUS, VSIGN_NONE, VSIGN_PLUSMINUS, YEARF_6DIG, YEARF_8DIG, YEARF_EXP8
Modifier | Constructor and Description |
---|---|
protected |
SessionManager(Phantom p,
Container c,
boolean pib)
Creates the session manager of the client.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areTooltipsDisplayed()
Gets the flag indicating tool-tips should or not be displayed on the client (informational
tooltips, not e.g.
|
String |
callObject(String objectID,
String argID,
int action,
String argString,
boolean doModal)
Calls an object in the server.
|
void |
clearLock()
Clears the lock state.
|
void |
clearNextMessageBoxOwner()
Clears the next dialog owner for message boxes.
|
void |
closeTunnel(int port)
Closes a socket tunnel from the client to the server on the specified port.
|
TunnelPort |
createTunnel(int port,
String dest)
Creates a socket tunnel from the client to the server on the specified port.
|
void |
ddeEvent(Transaction ddeTrans)
Callback method from DdeInterface object, to send an event to a
server object.
|
boolean |
doPlacePanelsInBrowser()
Checks if all panels should be placed inside the browser,
i.e.
|
Container |
getApplicationContainer()
Gets the application panel or the JApplet container.
|
PPanel |
getApplicationPanel()
Gets the application panel.
|
static int |
getComboAutoComplete()
The configuration of combobox auto-completion.
|
se.entra.phantom.client.PRuntime |
getCurrentRuntime()
Gets the current runtime application.
|
SessionManager.Session |
getCurrentSession()
Gets the current topmost panel session.
|
JDesktopPane |
getDesktopPane()
Gets the desktop pane where all the panels are placed,
including the application panel.
|
URL |
getDocumentURL(String doc)
Gets an URL relative or fixed used to display help documents
and documents used with
showDocument . |
PFocusManager |
getFocusManager() |
int |
getListBodyBackground()
The list body background color in RGB or -1 if not defined.
|
int |
getListHeaderBackground()
The list header background color in RGB or -1 if not defined.
|
Container |
getMessageBoxParent()
Gets the message box parent frame.
|
Container |
getNextDialogOwner()
Gets the next Frame or Dialog parent for a dialog box, this is nulled once it is used and
only used by the editor.
|
Phantom |
getPhantomApplet()
Gets the reference to the Phantom instance (applet).
|
String |
getProperty(String name)
Gets a property for the runtime application.
|
int |
getProperty(String name,
int defaultValue)
Gets an integer property for the runtime application.
|
Container |
getRootFrame()
Gets the root frame.
|
SessionManager.Session |
getSession(int ii)
Gets a session with a specific index.
|
Component |
getTopMostPanel()
Gets the top-most panel.
|
TunnelPort[] |
getTunnels()
Gets the current tunnels.
|
String |
getUserExitPrintFont()
Get the override user exit print font.
|
String |
getUserExitPrintListFont()
Get the override user exit print font for list box.
|
boolean |
isPrintWindow(KeyEvent e)
Checks if a key event is a print window keystroke.
|
boolean |
isSessionLocked()
Checks if the session is currently locked.
|
boolean |
isUserExitPrint(KeyEvent e)
Checks if a key event is a user exit print keystroke.
|
void |
messageBox(boolean doReply,
int icon,
int buttons,
String head,
String msg)
Displays a message box.
|
int |
messageBox(boolean doReply,
int icon,
int buttons,
String head,
String msg,
boolean doSendToServer)
Displays a message box.
|
RemoteSocket |
newRemoteSocket(String host,
int port)
Opens a new remote socket on the server.
|
protected boolean |
processInboundTransaction(int transCode,
Transaction trans)
Processes a transaction.
|
protected boolean |
processInboundTransactionAWT(int transCode,
Transaction trans)
The processing of a transaction in the AWT thread.
|
protected boolean |
processInboundTransactionWithDragLock(int transCode,
Transaction trans)
Processes a transaction.
|
void |
run()
Runs transactions in the AWT event thread rather than
the "socket reader" thread.
|
Container |
selectTopmostPanel()
Selects the top-most panel in the top-most session.
|
void |
sendDdeReply(int replyValue)
Send DDE reply to server.
|
void |
sendDirectTransaction(Transaction trans)
Send a transaction directly to be processed.
|
void |
setDesktopPane(JDesktopPane pane)
Sets the desktop pane directly.
|
void |
setLock()
Sets the lock state on.
|
void |
setLockState(boolean lock)
Sets the lock state on or off.
|
void |
setNextDialogOwner(Container frameOrDialog)
The next Frame or Dialog parent for a dialog box, this is nulled once it is used and
only used by the editor.
|
void |
setProperty(String name,
String value)
Sets a property for the runtime.
|
public Terminal terminal
public Container rootFrame
public Container getRootFrame()
public Container getMessageBoxParent()
public boolean isSessionLocked()
public Container getApplicationContainer()
public Phantom getPhantomApplet()
public String getProperty(String name)
public int getProperty(String name, int defaultValue)
public void setProperty(String name, String value)
public se.entra.phantom.client.PRuntime getCurrentRuntime()
public SessionManager.Session getCurrentSession()
public SessionManager.Session getSession(int ii)
SessionManager.Session
.public PPanel getApplicationPanel()
public boolean doPlacePanelsInBrowser()
public JDesktopPane getDesktopPane()
public void setDesktopPane(JDesktopPane pane)
public int getListHeaderBackground()
public int getListBodyBackground()
public static int getComboAutoComplete()
public void setLockState(boolean lock)
public String getUserExitPrintFont()
public String getUserExitPrintListFont()
public boolean isPrintWindow(KeyEvent e)
public boolean isUserExitPrint(KeyEvent e)
public void sendDirectTransaction(Transaction trans)
sendDirectTransaction
in interface ClientSessionManagerInterface
trans
- The transaction to process immediately.protected boolean processInboundTransaction(int transCode, Transaction trans)
transCode
- The transaction code.trans
- The transaction.protected boolean processInboundTransactionWithDragLock(int transCode, Transaction trans)
transCode
- The transaction code.trans
- The transaction.public String callObject(String objectID, String argID, int action, String argString, boolean doModal) throws InterruptedException
The parameter "doModal" can be set to "true" in which case the caller thread is blocked until the object has completed execution in the server (regardless if it is a REXX Macro or REXX Application).
Note that it can be "dangerous" to run modally in e.g. the AWT event thread (painting in windows and components will be blocked), and that if a message box displayed on the client side (due to the REXX function message), it must be removed by the user prior to the blocking to be released.
The "doModal" flag can NOT be set to "true" when processing updates to panels or components from the server, nor when responding to server-induced transactions, because these functions blocks the Client Socket reader thread that is used to receive the modal reply. If "doModal" is "true" and the Socket reader thread is blocked, an "InternalError" exception is thrown.
This method is thread-safe when running modally, so if possible, start a new thread to handle modal replies.
InterruptedException
- Only when "doModal" is "true" and
the blocked thread was interrupted.InternalError
- If the calling thread requests a modal
callObject and is currently executing
transactions from the Socket reader thread
or the AWT event dispatch thread.ObjectMessages
public URL getDocumentURL(String doc)
showDocument
.public PFocusManager getFocusManager()
public void setLock()
public void clearLock()
public void messageBox(boolean doReply, int icon, int buttons, String head, String msg)
public int messageBox(boolean doReply, int icon, int buttons, String head, String msg, boolean doSendToServer)
public Component getTopMostPanel()
public Container selectTopmostPanel()
public void run()
protected boolean processInboundTransactionAWT(int transCode, Transaction trans)
transCode
- The transaction code.trans
- The transaction.public void sendDdeReply(int replyValue)
public void ddeEvent(Transaction ddeTrans)
public void setNextDialogOwner(Container frameOrDialog)
public Container getNextDialogOwner()
public void clearNextMessageBoxOwner()
public boolean areTooltipsDisplayed()
public RemoteSocket newRemoteSocket(String host, int port)
host
- The destination host.port
- The destination port.public TunnelPort[] getTunnels()
public TunnelPort createTunnel(int port, String dest) throws IOException
port
- The port number on the client and on the server.dest
- The destination host on the server side.IOException
- For I/O errors.public void closeTunnel(int port) throws IOException
port
- The port number on the client and on the server.IOException
- For I/O errors.Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.