public class DefaultRemoteApplication extends Object implements ClientCommunicationListener
| Constructor and Description | 
|---|
| DefaultRemoteApplication()Creates the instance of the DefaultRemoteApplication. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | dispose()This method disposes immediately of any current remote
 application. | 
| AdminConfigRemoteApplication | getAdminConfigRemoteApplication()Gets the configured remote application. | 
| String | getApplicationName()Gets the application to in use (runtime file IDs). | 
| ClientCommunicationInterface | getClientCommunicationInterface()Gets the Client Communication Interface. | 
| ClientConnectionData | getClientConnectionData()Gets the Client Connection Data for the session
 (or null if no client session has yet been started). | 
| ClientSession | getClientSession()Gets the Client Session running the application or null if not
 yet initialized. | 
| ClientSessionManager | getClientSessionManager()Gets the Client Session Manager. | 
| static RAPPLine | getLine(VirtualInterface vi,
       int line)Creates a RAPPLine from a list-type control. | 
| RemoteApplicationManager | getRemoteApplicationManager()Gets the manager of this application. | 
| String | getSessionID()Gets the session ID. | 
| static String | getStringFromLine(RAPPLine line)Creates a String from a RAPPLine (tab delimited). | 
| String | getUserID()Gets the User ID (or empty string for none). | 
| protected VirtualInterface | getVirtualComponentFromID(String compID)Get control, menu item or special information. | 
| boolean | initiate()This method is called by the NetPhantom Server when
 a Remote Application (RAPP) client call initially connects
 to a port in the server and has been accepted. | 
| boolean | isClientTerminalDisplayed(ClientSession clientSession)Checks if the client is displaying the terminal window. | 
| boolean | isDisposed()Checks if the session has been disposed of. | 
| void | logError(String msg)Logs an error event. | 
| void | logInformational(String msg)Logs an informational event. | 
| void | logWarning(String msg)Logs a warning event. | 
| void | onClientChange(ClientSession clientSession)Notifies of a client change. | 
| void | onClientDispose(ClientSession clientSession)Notifies of a client session disposal. | 
| void | onClientInactivity(ClientSession clientSession)Called when the session has been inactive for a period of time. | 
| void | onConnect(ClientSessionManager csm,
         RemoteApplicationManager manager,
         AdminConfigRemoteApplication acra,
         ClientCommunicationInterface cci,
         DefaultCrypto crypto,
         String sessionID,
         String applicationName,
         String userID)Calls when a session is created the first time. | 
| void | onDisplayTerminal(ClientSession clientSession)Displays the terminal window. | 
| boolean | onExitApplication(ClientSession clientSession)Called when local code (e.g. | 
| void | onHostChange(ClientSession clientSession)Notifies of a host change. | 
| void | onHostSessionFailure(ClientSession clientSession,
                    String description)Notifies of a failure in a host session. | 
| void | onReconnect(ClientCommunicationInterface cci,
           DefaultCrypto crypto,
           String applicationName,
           String userID)Called when a session is reconnected. | 
| void | onRemoveTerminal(ClientSession clientSession)Removes the terminal window. | 
| void | onRequestCompleted(RequestThread requestThread)Called when the request thread has completed execution. | 
| void | onSoundAlarm(ClientSession clientSession)Sound alarm on the client. | 
| boolean | postInitiate()This method is called just at the end of the initialize operation and
 allows an extending class to override the initialize to perform specialized
 post-initialize operations. | 
| boolean | runCallClass(RequestThread requestThread,
            RAPPCallClass action)Runs the CallClass action. | 
| boolean | runCallHost(RequestThread requestThread,
           RAPPCallHost action)Runs the CallHost action. | 
| boolean | runCallHostGetField(RequestThread requestThread,
                   RAPPCallHost action)Runs the CallHost getField action. | 
| boolean | runCallHostGetScreen(RequestThread requestThread,
                    RAPPCallHost action)Runs the CallHost getScreen action. | 
| boolean | runCallObject(RequestThread requestThread,
             RAPPCallObject action)Runs the CallObject action. | 
| boolean | runCallPanel(RequestThread requestThread,
            RAPPCallPanel action)Runs the CallPanel action. | 
| boolean | runGlobVar(RequestThread requestThread,
          RAPPGlobVar action)Runs the GlobVar action. | 
| void | runRequest(RequestThread requestThread,
          Document document)Runs the request in the document. | 
| boolean | runRequest(RequestThread requestThread,
          RAPPTransaction transaction)Runs the request from a RAPPTransaction. | 
| void | traceInfo(String msg)If Client Verbose Trace is on a trace output will be done. | 
public DefaultRemoteApplication()
public final ClientCommunicationInterface getClientCommunicationInterface()
public final ClientSessionManager getClientSessionManager()
public final ClientSession getClientSession()
public final AdminConfigRemoteApplication getAdminConfigRemoteApplication()
public final String getSessionID()
public final String getApplicationName()
public final String getUserID()
public final ClientConnectionData getClientConnectionData()
public final RemoteApplicationManager getRemoteApplicationManager()
public final boolean isDisposed()
public void traceInfo(String msg)
public void logInformational(String msg)
public void logWarning(String msg)
public void logError(String msg)
public final void onConnect(ClientSessionManager csm, RemoteApplicationManager manager, AdminConfigRemoteApplication acra, ClientCommunicationInterface cci, DefaultCrypto crypto, String sessionID, String applicationName, String userID) throws IOException
IOException - if the client is rejected or a communication error occurs.public final void onReconnect(ClientCommunicationInterface cci, DefaultCrypto crypto, String applicationName, String userID) throws IOException
IOException - if the client is rejected or a communication error occurs.public final boolean initiate()
If an error is returned, it should be logged in this function.
This method cannot be overridden. However, specific initialization
 can be performed by overriding the postInitiate method.
public boolean postInitiate()
public void dispose()
public void onClientChange(ClientSession clientSession)
onClientChange in interface ClientCommunicationListenerpublic void onHostChange(ClientSession clientSession)
onHostChange in interface ClientCommunicationListenerpublic void onHostSessionFailure(ClientSession clientSession, String description)
onHostSessionFailure in interface ClientCommunicationListenerpublic void onDisplayTerminal(ClientSession clientSession)
onDisplayTerminal in interface ClientCommunicationListenerpublic void onRemoveTerminal(ClientSession clientSession)
onRemoveTerminal in interface ClientCommunicationListenerpublic boolean isClientTerminalDisplayed(ClientSession clientSession)
isClientTerminalDisplayed in interface ClientCommunicationListenerpublic void onSoundAlarm(ClientSession clientSession)
onSoundAlarm in interface ClientCommunicationListenerpublic boolean onExitApplication(ClientSession clientSession)
onExitApplication in interface ClientCommunicationListenerpublic void onClientInactivity(ClientSession clientSession)
onClientInactivity in interface ClientCommunicationListenerpublic void onClientDispose(ClientSession clientSession)
onClientDispose in interface ClientCommunicationListenerpublic void runRequest(RequestThread requestThread, Document document)
RequestThread instance.
 The method converts the document into a
 RAPPTransaction and then calls the method
 runRequest(requestThread,transaction).
 
Once this runRequest(requestThread,transaction)
 has completed, the contents (in XML) is read back from the
 RAPPTransaction and set as a reply string to
 the request.
 
This method can be overridden in order to perform initial actions, etc.
RAPPTransaction, 
RequestThreadpublic boolean runRequest(RequestThread requestThread, RAPPTransaction transaction)
RequestThread instance.
 If this method returns false, no XML document reply
 will be set for the RAPP client. This method must store
 the appropriate error in the request thread using
 requestThread.setError.
 
This method can be overridden in order to perform initial actions, etc.
RAPPTransaction, 
RequestThreadpublic boolean runCallObject(RequestThread requestThread, RAPPCallObject action)
The return value is a success flag. A failure indicates that the script must be halted after this action.
The action has to set it's own error code in the class and eventually also log the error/warning in the server log.
protected VirtualInterface getVirtualComponentFromID(String compID)
public static RAPPLine getLine(VirtualInterface vi, int line)
public static String getStringFromLine(RAPPLine line)
public boolean runCallPanel(RequestThread requestThread, RAPPCallPanel action)
The return value is a success flag. A failure indicates that the script must be halted after this action.
The action has to set it's own error code in the class and eventually also log the error/warning in the server log.
public boolean runCallHost(RequestThread requestThread, RAPPCallHost action)
The return value is a success flag. A failure indicates that the script must be halted after this action.
The action has to set it's own error code in the class and eventually also log the error/warning in the server log.
public boolean runCallHostGetField(RequestThread requestThread, RAPPCallHost action)
The return value is a success flag. A failure indicates that the script must be halted after this action.
public boolean runCallHostGetScreen(RequestThread requestThread, RAPPCallHost action)
The return value is a success flag. A failure indicates that the script must be halted after this action.
public boolean runCallClass(RequestThread requestThread, RAPPCallClass action)
The return value is a success flag. A failure indicates that the script must be halted after this action.
The action has to set it's own error code in the class and eventually also log the error/warning in the server log.
public boolean runGlobVar(RequestThread requestThread, RAPPGlobVar action)
The return value is a success flag. A failure indicates that the script must be halted after this action.
The action has to set it's own error code in the class and eventually also log the error/warning in the server log.
public final void onRequestCompleted(RequestThread requestThread)
This method cannot be overridden.
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.