public class ClientSessionManager extends Object implements ClientConnectionListener, ServerAdminInterface, NetPhantomConstants
Modifier and Type | Class and Description |
---|---|
class |
ClientSessionManager.Statistics
The statistics for transactions.
|
Modifier and Type | Field and Description |
---|---|
static boolean |
_internal_doRedirectJar |
static boolean |
_internal_doWebServerProxy |
static int |
CLIENT_TYPE_HTML
The HTML client type.
|
static int |
CLIENT_TYPE_JAVA
The Java client type.
|
static int |
CLIENT_TYPE_RAPP
The Remote Application client type.
|
protected static boolean |
isSystemExitAllowed
Flag for System.exit allowed.
|
static String |
progName
NetPhantom program name.
|
static String |
progVer
Program version string.
|
static String |
progVerReg
NetPhantom program version string (registered trademark).
|
long |
serverFreeMemory
Total free memory when ClientsessionManager is initialized.
|
long |
serverTotalMemory
Total used memory when ClientsessionManager is initialized.
|
long |
wsErrorCount
Web server error count.
|
long |
wsHitCount
Web server hit count.
|
long |
wsMaxQueueSize
Web server max queue size.
|
long |
wsRedirCount
Web server redirection count.
|
SUBSYS_API, SUBSYS_CLIENT, SUBSYS_HOST, SUBSYS_TELNET, TRACE_BINARY, TRACE_BINARYVERBOSE, TRACE_OFF, TRACE_VERBOSE
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
Constructor and Description |
---|
ClientSessionManager(String iniFileName,
boolean isRestartAvailable)
Creates an initial count of thread sessions.
|
ClientSessionManager(String iniFileName,
boolean isRestartAvailable,
boolean isEditor)
Creates an initial count of thread sessions.
|
ClientSessionManager(String iniFileName,
boolean isRestartAvailable,
int pgmType,
int clusterServerNumber)
Creates an initial count of thread sessions.
|
Modifier and Type | Method and Description |
---|---|
static void |
a() |
void |
addClientSessionListener(ClientSessionListener listener)
Adds a client session listener.
|
static void |
addHostReceiveTransaction(int size)
Adds a new host receive transaction for statistics.
|
static void |
addHostSendTransaction(int size)
Adds a new host send transaction for statistics.
|
void |
addInboundTransaction(int size)
Adds a new inbound transaction for statistics.
|
void |
addOutboundTransaction(int size)
Adds a new outbound transaction for statistics.
|
static void |
addPingReplyTime(ClientConnectionData client,
int milliTime)
Adds the reply to a ping round-trip.
|
String |
addRuntimeFile(String appName,
String filePath,
boolean doValidateUser)
Loads and adds a runtime file to the hash table containing all runtime
files.
|
void |
addServerProcessListener(ServerProcessListener listener)
Adds a server process listener.
|
static void |
addWebServerError()
Adds a web server error reply.
|
static void |
addWebServerHit(int currentQueueCount,
int maxCount)
Adds a web server hit.
|
static void |
addWebServerRedirection()
Adds a web server redirection.
|
static void |
addWebServerReply(int size)
Adds a new web server send reply for statistics.
|
static void |
addWebServerRequest(int size)
Adds a new web server request for statistics.
|
static void |
appendClientSettings(Transaction trans)
Appends the list colors and look-and-feel string to an initiate
transaction.
|
static void |
appendCountryInformation(Transaction trans)
Appends the country information for the initiate transaction.
|
static void |
appendLocalizedTextData(Transaction trans)
Appends the localized text to a transaction.
|
static void |
appendLocalizedTextData(Transaction trans,
String lang)
Appends the localized text to a transaction.
|
static void |
appendPrintTransactions(Transaction trans)
Appends the print window transaction and user exit print transaction if
defined.
|
static void |
appendTerminalWindowTransaction(Transaction trans)
Appends the terminal window transaction if defined.
|
boolean |
areNonServerAdminConnectionsAllowed()
Checks if non-ServerAdmin connections are allowed.
|
boolean |
changeEventFile()
Changes the event file.
|
boolean |
changeTraceFile()
Changes the trace file.
|
boolean |
clearWebServerCache()
Clears the web server cache.
|
Object |
clone() |
protected ClientSession |
createClientSession(int type,
ClientCommunicationInterface cci,
ClientConnectionData ccd,
ClientCommunicationListener ccl)
Create the Client Session instance.
|
ClientSession |
createNewSession(int type,
ClientCommunicationListener ccl,
InetAddress clientAddress)
Call this method to create a new client session that is created from either
a HTTP session or a request-reply session.
|
ClientConnectionData |
createPooledSessionData(String name)
Creates a new
ClientConnectionData instance for use in a
session pool. |
ClientSessionManager.Statistics |
createZeroedTransactionStatistics()
Gets the statistics for transactions.
|
boolean |
displayWebServerCache(VirtualCListBox list)
Fills a list box with the cache information.
|
static boolean |
disposeOfClientSession(ClientConnectionData ccd)
Disposes of the client session indicated by the client connection data.
|
static boolean |
doAPIBinaryTrace()
Checks if API binary trace is on.
|
static boolean |
doAPIVerboseTrace()
Checks if API verbose trace is on.
|
static boolean |
doClientBinaryTrace()
Checks if Client binary trace is on.
|
static boolean |
doClientVerboseTrace()
Checks if Client verbose trace is on.
|
static boolean |
doHostBinaryTrace()
Checks if Host binary trace is on.
|
static boolean |
doHostVerboseTrace()
Checks if Host verbose trace is on.
|
static boolean |
doResolveDNSName()
Resolving of DNS name or not.
|
static boolean |
doTelnetBinaryTrace()
Checks if Telnet binary trace is on.
|
static boolean |
doTelnetVerboseTrace()
Checks if Telnet verbose trace is on.
|
static boolean |
editor() |
static boolean |
exit(int rc)
Exits the system with a return code.
|
protected boolean |
exit(int rc,
boolean enableExit)
Exits the system with a return code.
|
protected void |
finalize()
The finalize method calls the Start class to trigger a pending restart of
the server.
|
static void |
fullGC()
Performs the full garbage collection.
|
int |
getClientConnectionCount()
Gets the current client connection count.
|
int[] |
getClientConnectionCounts()
Gets the current client count for the connection types.
|
static ClientConnectionData |
getClientConnectionData()
Gets the client connection data from the current thread.
|
static ClientConnectionData |
getClientConnectionData(Thread t)
Tries to get the client connection data from the thread specified.
|
ClientConnectionData[] |
getClientConnectionList()
Get the listing of client connections, not including a possible Editor session.
|
ClientSession |
getClientSessionFromThread()
Gets the ClientSession from the current thread.
|
ClientSession |
getClientSessionFromThread(Thread t)
Gets the ClientSession from the specified thread.
|
Enumeration<ClientSession> |
getClientSessions()
Gets an enumeration in a copy of a vector of all the client sessions.
|
ClientSession[] |
getClientSessionsArray()
Gets the array of all the client sessions.
|
VirtualSessionManager |
getClientVirtualSessionManager(long id)
Gets the VirtualSessionManager of a client connection ID.
|
static String |
getClusterBindAddress()
The bind address for all ports for a clustered server (null for none).
|
static String |
getClusterDnsName()
The DNS name to use for the web server (null for none).
|
static String |
getClusterIpAddress()
The IP address to use for the web server (null for none).
|
static int |
getClusterServerAdminPort()
Gets the server admin port for the cluster server (0=none).
|
static int |
getClusterServerCount()
The number of clustered servers (zero for normal server).
|
static int |
getClusterServerNumber()
Gets the cluster number of this server (0=not clustered).
|
static int |
getColor(String commaSeparatedRGB)
Gets a color RGB value from a comma separated string.
|
static int |
getComboAutoComplete()
Get the combo auto complete setting.
|
static ClientConnectionData |
getCurrentClientConnectionData()
Gets the ClientConnectionData instance for the currently running Thread.
|
static VirtualSessionManager |
getCurrentVirtualSessionManager()
Gets the current VirtualSessionManager from the currently running Thread.
|
int |
getDefaultHostSession()
Gets the default host session ('A' to 'Z') if none (or invalid) is
specified by the Client.
|
String |
getDefaultRuntimeApplicationName()
Gets the default runtime application name.
|
static byte[] |
getDefaultTraceLevels()
Returns the default trace levels.
|
JDesktopPane |
getDesktopPane()
Gets the desktop pane.
|
String[] |
getEventIDs()
Gets the list of available EventIDs for event logging.
|
String[] |
getEventIDsDescription()
Gets the list of available EventIDs description for event logging.
|
static long |
getFileSize(String fileName)
Helper method to get the size of a file.
|
GofManager |
getGofManager() |
GuiOnTheFlyRuntime |
getGuiOnTheFlyRuntime()
Gets the base definition of how Gui-on-the-fly looks like.
|
static String |
getHostAddress()
Gets the host address when depending on the bind address of the Admin port.
|
static String |
getHostAddressDirect()
Gets the host address.
|
static String |
getHostName()
Gets the host name depending on the bind address of the Admin port.
|
static String |
getHostNameDirect()
Gets the host name.
|
static int |
getListBodyBackground()
Gets the list body background color [base] item "listBodyBackground", -1 for none.
|
static int |
getListHeaderBackground()
Gets the list header background color [base] item "listHeaderBackground", -1 for none.
|
static String |
getLocalizedTextItem(int textIndex)
Access localized text for internal server use.
|
int |
getLoggingEvent(int eventIndex,
long clientID)
Checks if an event is logged for a particular event index.
|
int |
getLoggingEvent(String eventID,
long clientID)
Checks if an event is logged for a particular event ID.
|
LUMapperInterface |
getLUMapper()
Returns the LUMapper.
|
int |
getMaximumClientConnectionCount()
Deprecated.
Use getMaximumClientConnectionCount(int type) instead.
|
int |
getMaximumClientConnectionCount(int sessionType)
Gets the current maximum count of client connections.
|
int |
getMaximumClientConnectionStatus()
Deprecated.
No replacement.
|
int |
getMaximumWebServerRequests()
Gets the maximum count of outstanding web server requests.
|
static long |
getMemoryUsage()
Gets the amount of used memory.
|
static InetAddress |
getOutputBindAddress()
The bind address for output connections.
|
int |
getPingClientTimeout()
Gets the "ping" time value (in minutes) when a dummy transaction should be
sent to the client, 0 for none.
|
static Vector<Object[]> |
getPingReplies()
Gets the vector containing ping replies.
|
PortManager |
getPortManager()
Gets the server port manager.
|
PhantomRuntime |
getRuntimeApplication(String name)
Gets a runtime application of an ID.
|
String[] |
getRuntimeFileIDs()
Gets the runtime file IDs.
|
String[] |
getRuntimeFiles()
Lists the names of the runtime files used.
|
String[] |
getRuntimeIndexes()
Lists the indexes of the runtime files used.
|
PhantomRuntime |
getSecureLoginRuntimeApplication()
Gets the SecureLogin runtime application.
|
static String |
getServerAdminAddress()
Gets the server admin address used (as IP address 123.456.789.012).
|
static ClientSessionManager |
getServerAdminInterface()
Gets the user authentication runtime application.
|
static int |
getServerAdminPort()
Gets the server admin port used.
|
PhantomRuntime |
getServerAdminRuntime()
Gets the Server Administration runtime.
|
static IniFile |
getServerIni()
Gets the SERVER.INI class instance.
|
static String |
getSoftwareUpdatesURL()
Gets the string for "Checks for software updates".
|
long |
getStartupFreeMemory()
Returns free memory at startup.
|
long |
getStartupTotalMemory()
Returns memory use at startup.
|
static String |
getTextID(String id)
Gets a text ID from the "server.phm" file.
|
static String |
getTextID(String language,
String id)
Gets a text ID from the "server.phm" file.
|
static String |
getTextIDWithException(String id)
Gets a text ID from the "server.phm" file.
|
static String |
getTextIDWithException(String language,
String id)
Gets a text ID from the "server.phm" file.
|
static long |
getTotalMemoryChange()
Gets the changed amount of total memory.
|
int |
getTrace(long clientConnection,
int subsystem)
Gets the trace state for all clients or for a particular client connection.
|
ClientSessionManager.Statistics |
getTransactionStatistics()
Gets the statistics for transactions.
|
static UserAuthenticationInterface |
getUserAuthenticationInterface()
Gets the user authentication interface.
|
PhantomRuntime |
getUserAuthenticationRuntimeApplication()
Gets the user authentication runtime application.
|
static VirtualSessionManager |
getVirtualSessionManager(ClientConnectionData ccd)
Gets the current VirtualSessionManager from the currently running Thread.
|
int |
getWarningClientConnectionCount()
Deprecated.
No replacement.
|
HttpWebServer |
getWebServer()
Gets the web server instance, null for not initiated.
|
int |
getWebServerRequests()
Gets the current count of outstanding web server requests.
|
boolean |
hasClientConnectionChanged()
Checks for a change in the client connection list since the last call to
this routine.
|
static boolean |
hasExpired() |
static boolean |
hasLanguage(String language)
Checks if a language is defined and used for the server, apart of the
default one.
|
void |
initializePrintWindowTransaction()
Initiates the print window transaction.
|
protected void |
initializeSecurityManager()
Initializes the security manager for e.g.
|
void |
initializeTerminalWindowTransaction()
Initiates the terminal window transaction.
|
void |
initializeUserExitPrintTransaction()
Initiates the print window transaction.
|
void |
initLicense(VirtualSessionManager vsm)
Handles the license panel for the Editor.
|
void |
initLicense(VirtualSessionManager vsm,
VirtualPanel vp)
Handles the license panel for the Server Administration program.
|
static boolean |
instantiateProvider()
Instantiate the SSL provider.
|
boolean |
isApplicationEnabled(String appID)
Gets the application enabled state for new client connections.
|
boolean |
isClientConnectionAllowed(String id,
ServerSocketInterface ssi,
ISocket socket)
Checks if a client is allowed to connect or not.
|
boolean |
isClientLogonAllowed()
Checks if client logon is allowed.
|
static boolean |
isDebug()
Is this server running in debug mode?
|
boolean |
isEditor()
Checks if this is the Editor or not.
|
static boolean |
isEventLogged(int eventID)
Checks if an event is logged.
|
static boolean |
isHardJVMRestartAvailable()
Checks if hard restart JVM is available.
|
boolean |
isHttpTunnelingEnabled()
Checks if the server is enabled for HTTP tunneling.
|
boolean |
isInEditorGrace()
Checks if licensing is in editor grace period.
|
boolean |
isMaximumClientConnectionsReached()
Deprecated.
Use isMaximumClientConnectionsReached(int sessionType,int
extraSessions) instead.
|
boolean |
isMaximumClientConnectionsReached(int extraSessions)
Deprecated.
Use isMaximumClientConnectionsReached(int sessionType,int
extraSessions) instead.
|
boolean |
isMaximumClientConnectionsReached(int sessionType,
int extraSessions)
Checks if the maximum number of client connections allowed is reached.
|
boolean |
isNewInstallation()
Checks if this is a new installation.
|
boolean |
isRestarting()
Checks if the server is currently restarting.
|
static boolean |
isServerAdminOperational()
Checks if the server admin exit is operational.
|
boolean |
isServerConfigRequired()
Checks if the server needs to run in server configuration mode.
|
boolean |
isShuttingDown()
Checks if the server is currently shutting down.
|
boolean |
isSSLActive()
Check if SSL is activated.
|
boolean |
isWebServerStarted()
Checks if the web server is started or not.
|
void |
loadWebServer()
Checks and loads appropriate data used by the WebServerInterface.
|
static boolean |
logEvent(int eventID)
Log the event.
|
static boolean |
logEvent(int eventID,
String appendedText)
Log the event.
|
boolean |
logMessage(ClientSessionInterface cs,
String msg)
Log a message to the direct looger.
|
static String |
mapClientToHostLU(ClientConnectionData ccd,
String host,
int port)
Gets the 3270/5250 LU name from an internet address (and/or user name).
|
static String |
mapClientToHostLU(ClientSession clientSession,
HostSessionPeer hostSessionPeer,
ClientConnectionData ccd,
String host,
int port)
Gets the 3270/5250 LU name from an internet address (and/or user name).
|
static String |
mapLanguage(String language)
Maps a language ID to another one if this is defined in "server.ini".
|
void |
onClientConnect(String id,
ClientCommunicationInterface cci)
This method is called when the clientListener thread accepts an incoming
Java Client connection.
|
void |
onClientDisposed(ClientSession cs)
ClientSession calls this method whenever a client session is about to be
disposed.
|
static void |
onNewInstallation()
Called when this is a new installation by the installer.
|
void |
onRemoteApplicationConnect(String id,
ClientCommunicationInterface cci)
Called when a new connection is created from a remote application.
|
void |
onUnknownConnect(String id,
ServerSocketInterface ssi,
ISocket s,
int firstChar)
This method is called when the clientListener thread accepts an incoming
client connection.
|
int |
performEventCommand(String command)
Processes an event command.
|
int |
performEventCommand(String eventID,
int include,
long[] clientIDs)
Processes a single eventID specification for the event filter.
|
static void |
performFullAggressiveGarbageCollection()
Performs a full garbage collection very aggressively.
|
static void |
performSoftwareUpdates(VirtualPanel vp)
Checks for software updates for the Editor.
|
static void |
processSoftwareUpdates(VirtualPanel vp)
Checks for software updates for the Server.
|
void |
reloadMapFile()
Reloads the optional file used to map a client to a particular 3270 LU.
|
boolean |
reloadRuntimeFiles(String[] apps)
Reloads one or several runtime files of the specified indexes.
|
void |
removeClientSessionListener(ClientSessionListener listener)
Removes a client session listener.
|
protected static void |
removeKillThread()
Remove a kill-server thread.
|
boolean |
removeRuntimeFile(String appName)
Removes a runtime file from the application.
|
void |
removeServerProcessListener(ServerProcessListener listener)
Removes a server process listener.
|
static void |
replaceProgramText(Hashtable<String,String> textTable)
Replaces text as @**PROGSHORT@, @**PROGSERVER@, @**PROGCLIENT@ and @**PROGEDITOR@ with
the corresponding text "NetPhantom", "NetPhantom Server", "NetPhantom Client" and "NetPhantom Editor"
when running NetPhantom.
|
static String |
replaceProgramText(String text)
Replaces text as @**PROGSHORT@, @**PROGSERVER@, @**PROGCLIENT@ and @**PROGEDITOR@ with
the corresponding text "NetPhantom", "NetPhantom Server", "NetPhantom Client" and "NetPhantom Editor"
when running NetPhantom.
|
static int |
requestPingReplies()
Requests all Java clients to perform a PING round-trip and add the elapsed
time into an array that can be retrieved using getPingReplies.
|
void |
resetTransactionStatistics()
Resets the statistics for transactions.
|
boolean |
restart(boolean immed,
int restartState)
Requests the server restart or shut-down.
|
boolean |
rotateLog()
Rotate the files in the direct logger.
|
int |
sendApplicationBroadcastMessage(String applicationID,
String message)
Sends a broadcast message to all clients using the specified runtime
application.
|
int |
sendBroadcastMessage(String message)
Sends a general broadcast message to all clients.
|
boolean |
sendClientMessage(long id,
String message)
Sends a message to the specific client.
|
boolean |
setApplicationEnabled(String appID,
boolean enabledFlag)
Sets the application enabled state for new client connections.
|
boolean |
setClientLogonAllowed(boolean isAllowed)
Sets the client logon allowed count.
|
void |
setConfigRequired(boolean set)
Sets whether the server needs to run in server configuration mode.
|
boolean |
setLogActive(boolean on)
Turn the direct logger on or off.
|
int |
setMaximumClientConnectionCount(int maximum)
Deprecated.
No replacement.
|
static void |
setNewLimits(boolean shared,
int java,
int javaW,
int html,
int htmlW,
int rapp,
int rappW)
Set the user limits.
|
void |
setNonServerAdminConnectionsAllowed(boolean allow)
Sets the state of non-ServerAdmin connections allowed or not.
|
static void |
setResolveDNSName(boolean on)
Sets resolving of DNS name or not.
|
static void |
setServerUpgraded()
Sets the server as upgraded.
|
boolean |
setSystemExitAllowed(boolean allow)
Enables or disables possibility to do System.exit by accident from
Java code in e.g.
|
boolean |
setTrace(long clientConnection,
int subsystem,
int traceLevel)
Sets the trace state.
|
boolean |
setTrace(String cmd)
Sets trace options from a text string command.
|
void |
setWarningClientConnectionCount(int count)
Deprecated.
No replacement.
|
void |
shutDown(boolean immed)
Requests the server shut-down.
|
static void |
startupInitialize()
Starts up or initializes the ClientSessionManager for the Command Line
parts required.
|
void |
stopWebServer()
Stop the web server.
|
boolean |
terminateClientConnection(long id)
Terminate the connection of a client connection with an optional text
describing why this is done.
|
boolean |
traceClientConnection()
Prints a snap-shot list of current client connections to the current trace
file.
|
String |
validateCertificateChain(X509Certificate[] chain)
Validation routine for certificate.
|
public static boolean _internal_doRedirectJar
public static boolean _internal_doWebServerProxy
public static final String progVer
public static final String progVerReg
public static final String progName
public static final int CLIENT_TYPE_JAVA
public static final int CLIENT_TYPE_HTML
public static final int CLIENT_TYPE_RAPP
public long serverTotalMemory
public long serverFreeMemory
public long wsHitCount
public long wsRedirCount
public long wsErrorCount
public long wsMaxQueueSize
protected static boolean isSystemExitAllowed
public ClientSessionManager(String iniFileName, boolean isRestartAvailable) throws IOException, FileNotFoundException
IOException
- if an I/O error occurs.FileNotFoundException
public ClientSessionManager(String iniFileName, boolean isRestartAvailable, boolean isEditor) throws IOException, FileNotFoundException
IOException
- if an I/O error occurs.FileNotFoundException
public ClientSessionManager(String iniFileName, boolean isRestartAvailable, int pgmType, int clusterServerNumber) throws IOException, FileNotFoundException
IOException
- if an I/O error occurs.FileNotFoundException
public static void startupInitialize() throws IOException
IOException
public static void setNewLimits(boolean shared, int java, int javaW, int html, int htmlW, int rapp, int rappW)
public static int getClusterServerCount()
public static int getClusterServerNumber()
public static int getClusterServerAdminPort()
public static String getClusterBindAddress()
public static String getClusterIpAddress()
public static String getClusterDnsName()
public static String getHostAddress()
public static boolean isServerAdminOperational()
public static String getServerAdminAddress()
public static int getServerAdminPort()
public static String getHostNameDirect()
public static String getHostAddressDirect()
public static String getHostName()
public static InetAddress getOutputBindAddress()
protected void finalize() throws Throwable
public static boolean isHardJVMRestartAvailable()
public static boolean instantiateProvider() throws IOException
IOException
public static boolean doResolveDNSName()
public static void setResolveDNSName(boolean on)
public boolean isInEditorGrace()
public boolean isSSLActive()
public int getDefaultHostSession()
protected static void removeKillThread()
protected final void initializeSecurityManager()
public boolean setSystemExitAllowed(boolean allow)
allow
- Flag indicating if System.exit is allowed.public static boolean exit(int rc)
System.exit(rc)
. If the server is running as a Windows NT
Service, then the service interface is informed of the server stop.protected boolean exit(int rc, boolean enableExit)
System.exit(rc)
. If the server is running as a Windows NT
Service, then the service interface is informed of the server stop.rc
- The return code.enableExit
- Flag to enable exiting.public static void setServerUpgraded()
public LUMapperInterface getLUMapper()
public static long getMemoryUsage()
Note: The value returned may be negative!
public static long getTotalMemoryChange()
Note: The value returned may be negative!
public long getStartupTotalMemory()
public long getStartupFreeMemory()
public static void performFullAggressiveGarbageCollection()
Only one instance of this thread is running at the time.
The ClientSessionManager calls this method each time a client has disconnected, in order to free up memory for the next client(s).
public static void fullGC()
public static boolean doTelnetBinaryTrace()
public static boolean doTelnetVerboseTrace()
public static boolean doHostBinaryTrace()
public static boolean doHostVerboseTrace()
public static boolean doClientBinaryTrace()
public static boolean doClientVerboseTrace()
public static boolean doAPIBinaryTrace()
public static boolean doAPIVerboseTrace()
public static final byte[] getDefaultTraceLevels()
public static boolean isEventLogged(int eventID)
logEvent
method if the event requires many object instances of
e.g. String
in order to relieve the garbage collector.
The logEvent
method always calls the
isEventLogged
method first in order to verify if the event is
filtered or not.
All events are numbered and stored in the EventID
class as
static member variables.
eventID
- The event ID to verify.EventID
public static boolean logEvent(int eventID, String appendedText)
isEventLogged
may be used to check if the event is
logged or not.
The logEvent
method always calls the
isEventLogged
method first in order to verify if the event is
filtered or not.
All events are numbered and stored in the EventID
class as
static member variables.
The appendedText
variable may be set to null, in which case no
text will be appended to the event text.
eventID
- The event ID.appendedText
- The text for the event, null
for none.EventID
public static boolean logEvent(int eventID)
isEventLogged
may be used to check if the event is
logged or not.
The logEvent
method always calls the
isEventLogged
method first in order to verify if the event is
filtered or not.
All events are numbered and stored in the EventID
class as
static member variables.
eventID
- The event ID.EventID
public static IniFile getServerIni()
null
if not yet initialized.public static void replaceProgramText(Hashtable<String,String> textTable)
public static String replaceProgramText(String text)
public static String mapLanguage(String language)
language
- The language ID or code to map.language
if
no mapping is present).public static boolean hasLanguage(String language)
language
- The language ID or code to check for mapping.public static void appendLocalizedTextData(Transaction trans)
Note: the client locale is checked and the correct strings are appended.
trans
- The transaction to append localized data to.public static void appendLocalizedTextData(Transaction trans, String lang)
Note: the client locale is checked and the correct strings are appended.
trans
- The transaction to append localized data to.lang
- The language ID or code to append as localized data.public static String getLocalizedTextItem(int textIndex)
Note: No checking is done for the current client locale, it is used by http.HtmlForm class only.
textIndex
- The index in the localization table.ArrayIndexOutOfBoundsException
- If textIndex
is less than zero or
equal or larger than the text localization
table.public static String mapClientToHostLU(ClientConnectionData ccd, String host, int port)
The method mapClientToHostLU that uses the clientSession and hostSessionPeer parameters should be used instead.
public static String mapClientToHostLU(ClientSession clientSession, HostSessionPeer hostSessionPeer, ClientConnectionData ccd, String host, int port)
The method mapClientToHostLU that uses a hostSessionPeer parameter should be used instead.
public static String getTextID(String id)
public static String getTextID(String language, String id)
The language will be used for an initial search, and if either the language or the String ID is not found, it is taken from the default language text file.
public static String getTextIDWithException(String id) throws IOException
IOException
- when the text ID is not found.public static String getTextIDWithException(String language, String id) throws IOException
The language will be used for an initial search, and if either the language or the String ID is not found, it is taken from the default language text file.
IOException
- when the text ID is not found.public boolean isServerConfigRequired()
public void setConfigRequired(boolean set)
public PhantomRuntime getServerAdminRuntime()
public final GofManager getGofManager()
public final GuiOnTheFlyRuntime getGuiOnTheFlyRuntime()
public PhantomRuntime getRuntimeApplication(String name)
public String getDefaultRuntimeApplicationName()
public static ClientSessionManager getServerAdminInterface()
public PhantomRuntime getSecureLoginRuntimeApplication()
public PhantomRuntime getUserAuthenticationRuntimeApplication()
public static UserAuthenticationInterface getUserAuthenticationInterface()
public JDesktopPane getDesktopPane()
public boolean isHttpTunnelingEnabled()
public HttpWebServer getWebServer()
public int getWebServerRequests()
public int getMaximumWebServerRequests()
public boolean displayWebServerCache(VirtualCListBox list)
public boolean clearWebServerCache()
public void onUnknownConnect(String id, ServerSocketInterface ssi, ISocket s, int firstChar) throws IOException
onUnknownConnect
in interface ClientConnectionListener
IOException
- when the connect cannot be performed.public void onRemoteApplicationConnect(String id, ClientCommunicationInterface cci) throws IOException
onRemoteApplicationConnect
in interface ClientConnectionListener
IOException
- when the connect cannot be performed.public void onClientConnect(String id, ClientCommunicationInterface cci)
onClientConnect
in interface ClientConnectionListener
public ClientSession createNewSession(int type, ClientCommunicationListener ccl, InetAddress clientAddress)
type
parameter is used to specify the
client type (see CLIENT_TYPE_*).public ClientConnectionData createPooledSessionData(String name)
ClientConnectionData
instance for use in a
session pool.protected ClientSession createClientSession(int type, ClientCommunicationInterface cci, ClientConnectionData ccd, ClientCommunicationListener ccl)
public void onClientDisposed(ClientSession cs)
public static boolean disposeOfClientSession(ClientConnectionData ccd)
public void shutDown(boolean immed)
shutDown
in interface ServerAdminInterface
public boolean restart(boolean immed, int restartState)
The "restartState" parameter indicates shut-down or restart state:
0 = shut-down,
1 = soft restart,
2 = hard restart,
3 = hard JVM restart.
public boolean isRestarting()
public boolean isShuttingDown()
public void reloadMapFile() throws IOException
reloadMapFile
in interface ServerAdminInterface
IOException
- if an I/O error occurs.public String[] getRuntimeIndexes()
getRuntimeIndexes
in interface ServerAdminInterface
public String[] getRuntimeFiles()
getRuntimeFiles
in interface ServerAdminInterface
public String[] getRuntimeFileIDs()
public boolean reloadRuntimeFiles(String[] apps) throws IOException
reloadRuntimeFiles
in interface ServerAdminInterface
IOException
- if an I/O error occurs.public String addRuntimeFile(String appName, String filePath, boolean doValidateUser)
public boolean removeRuntimeFile(String appName)
public PortManager getPortManager()
public boolean setApplicationEnabled(String appID, boolean enabledFlag)
setApplicationEnabled
in interface ServerAdminInterface
public boolean isApplicationEnabled(String appID)
isApplicationEnabled
in interface ServerAdminInterface
public boolean isClientLogonAllowed()
isClientLogonAllowed
in interface ServerAdminInterface
public boolean setClientLogonAllowed(boolean isAllowed)
setClientLogonAllowed
in interface ServerAdminInterface
public boolean isClientConnectionAllowed(String id, ServerSocketInterface ssi, ISocket socket)
isClientConnectionAllowed
in interface ClientConnectionListener
public boolean areNonServerAdminConnectionsAllowed()
public void setNonServerAdminConnectionsAllowed(boolean allow)
@Deprecated public boolean isMaximumClientConnectionsReached()
@Deprecated public boolean isMaximumClientConnectionsReached(int extraSessions)
public boolean isMaximumClientConnectionsReached(int sessionType, int extraSessions)
The type
parameter is -1 for common (shared count) and
otherwise CLIENT_TYPE_JAVA, CLIENT_TYPE_HTML or CLIENT_TYPE_RAPP.
@Deprecated public int getMaximumClientConnectionCount()
getMaximumClientConnectionCount
in interface ServerAdminInterface
public int getMaximumClientConnectionCount(int sessionType)
The type
parameter is -1 for common (shared count) and
otherwise CLIENT_TYPE_JAVA, CLIENT_TYPE_HTML or CLIENT_TYPE_RAPP.
@Deprecated public int getMaximumClientConnectionStatus()
@Deprecated public int setMaximumClientConnectionCount(int maximum)
setMaximumClientConnectionCount
in interface ServerAdminInterface
public boolean hasClientConnectionChanged()
hasClientConnectionChanged
in interface ServerAdminInterface
public int getClientConnectionCount()
getClientConnectionCount
in interface ServerAdminInterface
public int[] getClientConnectionCounts()
@Deprecated public int getWarningClientConnectionCount()
@Deprecated public void setWarningClientConnectionCount(int count)
public ClientConnectionData[] getClientConnectionList()
getClientConnectionList
in interface ServerAdminInterface
public VirtualSessionManager getClientVirtualSessionManager(long id)
public boolean traceClientConnection()
traceClientConnection
in interface ServerAdminInterface
public boolean terminateClientConnection(long id)
terminateClientConnection
in interface ServerAdminInterface
public boolean sendClientMessage(long id, String message)
sendClientMessage
in interface ServerAdminInterface
public int sendBroadcastMessage(String message)
sendBroadcastMessage
in interface ServerAdminInterface
public int sendApplicationBroadcastMessage(String applicationID, String message)
sendApplicationBroadcastMessage
in interface ServerAdminInterface
public boolean changeEventFile()
changeEventFile
in interface ServerAdminInterface
public boolean changeTraceFile()
changeTraceFile
in interface ServerAdminInterface
public boolean setTrace(long clientConnection, int subsystem, int traceLevel)
setTrace
in interface ServerAdminInterface
public int getTrace(long clientConnection, int subsystem)
getTrace
in interface ServerAdminInterface
public static void appendCountryInformation(Transaction trans)
public boolean setTrace(String cmd)
The form is: Trace client subsystem level.
public int performEventCommand(String command) throws ParseException, NumberFormatException
. EventFilter --+--+-- ALL --+-- [INCLUDE:event_id] -- [EXCLUDE:event_id] -- [DEFAULT:event_id] . | | | . | +-- client_id --+ . | | . +----- , -----------+where client_id can be a comma-separated (no spaces in between) list of several client_ids,
and event_id is a comma-separated list (no spaces in between) of eventIDs as defined in SERVER.PHM and/or a range of eventIDs and/or using the '*' wildcard to accept any eventID starting with the text preceding the '*'.
To specify all events, use the event range string "*-*".
Note that the command "EventFilter ALL DEFAULT:nnn" will never return other values than zero, because the "ALL" indicates the default setting for all clients.
performEventCommand
in interface ServerAdminInterface
ParseException
- When the command in SERVER.INI are invalid.NumberFormatException
- When a clientID is wrong.public int performEventCommand(String eventID, int include, long[] clientIDs)
The eventID is an eventID as defined in SERVER.PHM or a range of eventIDs and/or using the '*' wildcard to accept any eventID starting with the text preceding the '*'. The range separator is '-'.
The value "include" must be zero or one for a global filter and can be zero=exclude, one=include, 2=default (use global filter).
performEventCommand
in interface ServerAdminInterface
public String[] getEventIDs()
getEventIDs
in interface ServerAdminInterface
public String[] getEventIDsDescription()
getEventIDsDescription
in interface ServerAdminInterface
public int getLoggingEvent(String eventID, long clientID)
If clientID is zero, the global setting will be returned.
getLoggingEvent
in interface ServerAdminInterface
The return value will be -1 if the eventID is not found or the client does not exist.
public int getLoggingEvent(int eventIndex, long clientID)
getEventIDs
.
If clientID is zero, the global setting will be returned.
getLoggingEvent
in interface ServerAdminInterface
The return value will be -1 if the eventID is not found or the client does not exist.
public static long getFileSize(String fileName)
public static void appendClientSettings(Transaction trans)
public static int getComboAutoComplete()
public static int getColor(String commaSeparatedRGB)
public static int getListHeaderBackground()
public static int getListBodyBackground()
public Enumeration<ClientSession> getClientSessions()
public ClientSession[] getClientSessionsArray()
public void initializePrintWindowTransaction()
public void initializeUserExitPrintTransaction()
public static void appendPrintTransactions(Transaction trans)
public void initializeTerminalWindowTransaction()
public static void appendTerminalWindowTransaction(Transaction trans)
public void loadWebServer() throws IOException
IOException
- if there is a problem in loading the web server.public void stopWebServer()
public boolean isWebServerStarted()
public void addOutboundTransaction(int size)
public void addInboundTransaction(int size)
public static void addHostSendTransaction(int size)
public static void addHostReceiveTransaction(int size)
public static void addWebServerReply(int size)
public static void addWebServerHit(int currentQueueCount, int maxCount)
public static void addWebServerRedirection()
public static void addWebServerError()
public static void addWebServerRequest(int size)
public static void addPingReplyTime(ClientConnectionData client, int milliTime)
public static int requestPingReplies()
public int getPingClientTimeout()
public static Vector<Object[]> getPingReplies()
The vector is not cloned before returning from the original one, so additional elements may be added at the end by some other thread, unless synchronized on the vector.
public void addServerProcessListener(ServerProcessListener listener)
public void removeServerProcessListener(ServerProcessListener listener)
public void addClientSessionListener(ClientSessionListener listener)
public void removeClientSessionListener(ClientSessionListener listener)
public void resetTransactionStatistics()
public ClientSessionManager.Statistics createZeroedTransactionStatistics()
public ClientSessionManager.Statistics getTransactionStatistics()
public boolean logMessage(ClientSessionInterface cs, String msg)
cs
- msg
- public boolean setLogActive(boolean on)
on
- public boolean rotateLog()
public static void onNewInstallation()
public boolean isNewInstallation()
public static String getSoftwareUpdatesURL()
public static void a()
public void initLicense(VirtualSessionManager vsm, VirtualPanel vp)
public void initLicense(VirtualSessionManager vsm)
public String validateCertificateChain(X509Certificate[] chain)
public static boolean editor()
public static boolean hasExpired()
public boolean isEditor()
public static void processSoftwareUpdates(VirtualPanel vp)
public static boolean isDebug()
public static void performSoftwareUpdates(VirtualPanel vp)
public static ClientConnectionData getCurrentClientConnectionData()
public static VirtualSessionManager getCurrentVirtualSessionManager()
public static VirtualSessionManager getVirtualSessionManager(ClientConnectionData ccd)
public static ClientConnectionData getClientConnectionData(Thread t)
public static ClientConnectionData getClientConnectionData()
public ClientSession getClientSessionFromThread()
public ClientSession getClientSessionFromThread(Thread t)
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.