com.ibm.eNetwork.HOD.common.cached
Interface LoadableJSAppletInterface


public interface LoadableJSAppletInterface

LoadableJSAppletInterface provides an optional mechanism to access the caching management of Host On-Demand specific libraries provided by the Host On-Demand server and to provide access to the applet via Java Script.

A custom applet, implementing this interface and launched via com.ibm.eNetwork.HOD.cached.appletloader.JSCachedAppletLoader in a Deployment Wizard derived HTML, can specify automatic caching management of the required Host On-Demand specific libraries.

In contrast the custom applet libraries themselves will be downloaded and temporarily cached in the browser.


Method Summary
 java.lang.String callCustomerFunction(java.lang.String fncName, java.lang.String parms)
          Method which can be used to extend the API to provide additional functionality.
 int connectSession()
          Method called to cause a session to initiate the connection.
 int connectSession1(java.lang.String sessionName)
          Method called to cause a session specified by the sessionName to initiate the connection.
 int disconnectSession()
          Method called to cause a session to disconnect.
 int disconnectSession1(java.lang.String sessionName)
          Method called to cause the session specified by the sessionName to disconnect.
 int displaySession()
          Method to display the currently selected session.
 int displaySession1(java.lang.String sessionName)
          Method to display the session specified by the sessionName.
 java.lang.String getAllSessionNames()
          Method which can be used to return a list of all active sessions.
 java.lang.String getErrorMessage()
          Method which can be used to receive any error messages
 java.lang.String getSessionID()
          Method which can be used to return the ID of the last session started by startSession.
 java.lang.String getString()
          Method which can be used to retrieve data from a session.
 java.lang.String getString1(java.lang.String sessionName)
          Method which can be used to retrieve data from the session specified by sessionName
 java.lang.String getString3(java.lang.String sessionName, int pos, int length)
          Method which can be used to retrieve data from the session specified by sessionName
 java.lang.String getString4(java.lang.String sessionName, int row, int col, int length)
          Method which can be used to retrieve data from the session specified by sessionName at the specified position.
 int getStringLength()
          Method which can be used to return the number of characters copied into the last getString() call.
 int hideHODDesktop()
          Method to hide the HOD desktop.
 void init()
          Called by JSCachedAppletLoader to inform this LoadableJSAppletInterface instance that it has been loaded into the system.
 int inputInhibited()
          Method which can be used to check whether the currently selected session is ready for interaction, such as sending keystrokes or calling other API methods
 int inputInhibited1(java.lang.String sessionName)
          Method which can be used to check whether the specified session is ready for interaction, such as sending keystrokes or calling other API methods
 boolean isCommReady()
          Method which can be used to check whether the currently selected session is ready to communicate with the host.
 boolean isCommReady1(java.lang.String sessionName)
          Method which can be used to check whether the specified session is ready to communicate with the host.
 boolean isSessionActive(java.lang.String sessionName)
          Method which can be used to determine if the specified session is active.
 int reset()
          Method which can be used to rest the currently selected session's locked keyboard
 int reset1(java.lang.String sessionName)
          Method which can be used to rest the specified sessions locked keyboard
 int sendKeys1(java.lang.String text)
          Method which can be used to send a string of keys to a session.
 int sendKeys2(java.lang.String sessionName, java.lang.String text)
          Method which can be used to send a string of keys to a session specified by sessionName
 int sendKeys3(java.lang.String sessionName, java.lang.String text, int pos)
          Method which can be used to send a string of keys to a session specified by sessionName at the specified cursor location.
 int sendKeys4(java.lang.String sessionName, java.lang.String text, int row, int col)
          Method which can be used to send a string of keys to a session specified by sessionName at the specified row and column.
 void setApplet(java.applet.Applet a)
          Called by CachedAppletLoader to pass a reference to itself to this LoadableAppletInterface instance.
 int setString1(java.lang.String text)
          Method which can be used to send a string of keys to a session.
 int setString2(java.lang.String sessionName, java.lang.String text)
          Method which can be used to send a string of keys to a session specified by sessionName
 int setString3(java.lang.String sessionName, java.lang.String text, int pos)
          Method which can be used to send a string of keys to a session specified by sessionName at the specified cursor location.
 int setString4(java.lang.String sessionName, java.lang.String text, int row, int col)
          Method which can be used to send a string of keys to a session specified by sessionName at the specified row and column.
 int showHODDesktop()
          Method to show the HOD desktop.
 void start()
          Called by JSCachedAppletLoader to inform this LoadableJSAppletInterface instance that it should start its execution.
 int startMacro1(java.lang.String macroName)
          Method which can be used to start a macro on the current session.
 int startMacro2(java.lang.String sessionName, java.lang.String macroName)
          Method which can be used to start a macro on the specified session
 int startSession(java.lang.String sessionName)
          Method which can be used to start the session specified
 void stop()
          Called by JSCachedAppletLoader to inform this LoadableJSAppletInterface instance that the stop method has been called.
 int stopAllSessions()
          Method called to stop all active sessions
 int stopSession()
          Method called to stop a session
 int stopSession1(java.lang.String sessionName)
          Method called to stop a particular session specified by the sessionName
 int waitForStringInRect8(java.lang.String text, int sRow, int sCol, int eRow, int eCol, long timeout, boolean waitForInput, boolean caseSensitive)
          Method which can be used to synchronously wait until the input text string appears at the given rectangle in the currently selected session
 int waitForStringInRect9(java.lang.String sessionName, java.lang.String text, int sRow, int sCol, int eRow, int eCol, long timeout, boolean waitForInput, boolean caseSensitive)
          Method which can be used to synchronously wait until the input text string appears at the given rectangle in the session specified by sessionName.
 int waitWhileStringInRect8(java.lang.String text, int sRow, int sCol, int eRow, int eCol, long timeout, boolean waitForInput, boolean caseSensitive)
          Method which can be used to synchronously wait until the input text string is no longer in the given rectangle in the currently selected session.
 int waitWhileStringInRect9(java.lang.String sessionName, java.lang.String text, int sRow, int sCol, int eRow, int eCol, long timeout, boolean waitForInput, boolean caseSensitive)
          Method which can be used to synchronously wait until the input text string is no longer in the given rectangle in the session specified by sessionName.
 

Method Detail

setApplet

public void setApplet(java.applet.Applet a)
Called by CachedAppletLoader to pass a reference to itself to this LoadableAppletInterface instance.

The class implementing LoadableJSAppletInterface is not the top level class that the browser is aware of: JSCachedAppletLoader is. A reference to JSCachedAppletLoader provides an access path to top level functionality.


start

public void start()
Called by JSCachedAppletLoader to inform this LoadableJSAppletInterface instance that it should start its execution.

init

public void init()
Called by JSCachedAppletLoader to inform this LoadableJSAppletInterface instance that it has been loaded into the system.

stop

public void stop()
Called by JSCachedAppletLoader to inform this LoadableJSAppletInterface instance that the stop method has been called.

startSession

public int startSession(java.lang.String sessionName)
Method which can be used to start the session specified
Parameters:
sessionName - the name of the session to be started.

getSessionID

public java.lang.String getSessionID()
Method which can be used to return the ID of the last session started by startSession.

getAllSessionNames

public java.lang.String getAllSessionNames()
Method which can be used to return a list of all active sessions.

stopSession

public int stopSession()
Method called to stop a session

stopSession1

public int stopSession1(java.lang.String sessionName)
Method called to stop a particular session specified by the sessionName
Parameters:
sessionName - the name of the session to be stopped.

stopAllSessions

public int stopAllSessions()
Method called to stop all active sessions

connectSession

public int connectSession()
Method called to cause a session to initiate the connection.

connectSession1

public int connectSession1(java.lang.String sessionName)
Method called to cause a session specified by the sessionName to initiate the connection.
Parameters:
sessionName - the name of the session to connect

disconnectSession

public int disconnectSession()
Method called to cause a session to disconnect.

disconnectSession1

public int disconnectSession1(java.lang.String sessionName)
Method called to cause the session specified by the sessionName to disconnect.
Parameters:
sessionName - the name of the session to disconnect

displaySession

public int displaySession()
Method to display the currently selected session.

displaySession1

public int displaySession1(java.lang.String sessionName)
Method to display the session specified by the sessionName.
Parameters:
sessionName - the name of the session to display

hideHODDesktop

public int hideHODDesktop()
Method to hide the HOD desktop.

showHODDesktop

public int showHODDesktop()
Method to show the HOD desktop.

sendKeys1

public int sendKeys1(java.lang.String text)
Method which can be used to send a string of keys to a session.
Parameters:
text - String of keys to send

sendKeys2

public int sendKeys2(java.lang.String sessionName,
                     java.lang.String text)
Method which can be used to send a string of keys to a session specified by sessionName
Parameters:
sessionName - the name of the session
text - The string of characters and aid key mnemonics to be sent.

sendKeys3

public int sendKeys3(java.lang.String sessionName,
                     java.lang.String text,
                     int pos)
Method which can be used to send a string of keys to a session specified by sessionName at the specified cursor location.
Parameters:
sessionName - the name of the session
text - The string of characters and aid key mnemonics to be sent.
pos - The linear position where keys should be sent.

sendKeys4

public int sendKeys4(java.lang.String sessionName,
                     java.lang.String text,
                     int row,
                     int col)
Method which can be used to send a string of keys to a session specified by sessionName at the specified row and column.
Parameters:
sessionName - the name of the session
text - The string of characters and mnemonic keywords to be sent.
row - The starting row where keys should be sent.
col - The starting column where keys should be sent.

setString1

public int setString1(java.lang.String text)
Method which can be used to send a string of keys to a session.
Parameters:
text - String of keys to send

setString2

public int setString2(java.lang.String sessionName,
                      java.lang.String text)
Method which can be used to send a string of keys to a session specified by sessionName
Parameters:
sessionName - the name of the session
text - The string of characters and aid key mnemonics to be sent.

setString3

public int setString3(java.lang.String sessionName,
                      java.lang.String text,
                      int pos)
Method which can be used to send a string of keys to a session specified by sessionName at the specified cursor location.
Parameters:
sessionName - the name of the session
text - The string of characters and aid key mnemonics to be sent.
pos - The linear position where keys should be sent.

setString4

public int setString4(java.lang.String sessionName,
                      java.lang.String text,
                      int row,
                      int col)
Method which can be used to send a string of keys to a session specified by sessionName at the specified row and column.
Parameters:
sessionName - the name of the session
text - The string of characters and mnemonic keywords to be sent.
row - The starting row where keys should be sent.
col - The starting column where keys should be sent.

getString

public java.lang.String getString()
Method which can be used to retrieve data from a session.
Returns:
String from a session

getString1

public java.lang.String getString1(java.lang.String sessionName)
Method which can be used to retrieve data from the session specified by sessionName
Parameters:
sessionName - the name of the session
Returns:
String from a session

getString3

public java.lang.String getString3(java.lang.String sessionName,
                                   int pos,
                                   int length)
Method which can be used to retrieve data from the session specified by sessionName
Parameters:
sessionName - the name of the session
pos - the position to receive
length - length of data to receive
Returns:
String from a session

getString4

public java.lang.String getString4(java.lang.String sessionName,
                                   int row,
                                   int col,
                                   int length)
Method which can be used to retrieve data from the session specified by sessionName at the specified position.
Parameters:
sessionName - the name of the session
row - the starting row
col - the starting column
length - length of data to receive
Returns:
String from a session

getStringLength

public int getStringLength()
Method which can be used to return the number of characters copied into the last getString() call.
Returns:
length of the string

inputInhibited

public int inputInhibited()
Method which can be used to check whether the currently selected session is ready for interaction, such as sending keystrokes or calling other API methods

inputInhibited1

public int inputInhibited1(java.lang.String sessionName)
Method which can be used to check whether the specified session is ready for interaction, such as sending keystrokes or calling other API methods
Parameters:
sessionName - the name of the session

isCommReady

public boolean isCommReady()
Method which can be used to check whether the currently selected session is ready to communicate with the host.

isCommReady1

public boolean isCommReady1(java.lang.String sessionName)
Method which can be used to check whether the specified session is ready to communicate with the host.
Parameters:
sessionName - the name of the session

reset

public int reset()
Method which can be used to rest the currently selected session's locked keyboard

reset1

public int reset1(java.lang.String sessionName)
Method which can be used to rest the specified sessions locked keyboard
Parameters:
sessionName - the name of the session

waitForStringInRect8

public int waitForStringInRect8(java.lang.String text,
                                int sRow,
                                int sCol,
                                int eRow,
                                int eCol,
                                long timeout,
                                boolean waitForInput,
                                boolean caseSensitive)
Method which can be used to synchronously wait until the input text string appears at the given rectangle in the currently selected session
Parameters:
text - text to wait for
sRow - start row
sCol - start column
eRow - end row
eCol - end column
timeout - timeout value
waitForInput - if true, will wait until OIA indicates session is ready for input.
caseSensitive - if true, the text will be case sensitive

waitForStringInRect9

public int waitForStringInRect9(java.lang.String sessionName,
                                java.lang.String text,
                                int sRow,
                                int sCol,
                                int eRow,
                                int eCol,
                                long timeout,
                                boolean waitForInput,
                                boolean caseSensitive)
Method which can be used to synchronously wait until the input text string appears at the given rectangle in the session specified by sessionName.
Parameters:
sessionName - name of the session
text - text to wait for
sRow - start row
sCol - start column
eRow - end row
eCol - end column
timeout - timeout value
waitForInput - if true, will wait until OIA indicates session is ready for input.
caseSensitive - if true, the text will be case sensitive

waitWhileStringInRect8

public int waitWhileStringInRect8(java.lang.String text,
                                  int sRow,
                                  int sCol,
                                  int eRow,
                                  int eCol,
                                  long timeout,
                                  boolean waitForInput,
                                  boolean caseSensitive)
Method which can be used to synchronously wait until the input text string is no longer in the given rectangle in the currently selected session.
Parameters:
text - text to wait for
sRow - start row
sCol - start column
eRow - end row
eCol - end column
timeout - timeout value
waitForInput - if true, will wait until OIA indicates session is ready for input.
caseSensitive - if true, the text will be case sensitive

waitWhileStringInRect9

public int waitWhileStringInRect9(java.lang.String sessionName,
                                  java.lang.String text,
                                  int sRow,
                                  int sCol,
                                  int eRow,
                                  int eCol,
                                  long timeout,
                                  boolean waitForInput,
                                  boolean caseSensitive)
Method which can be used to synchronously wait until the input text string is no longer in the given rectangle in the session specified by sessionName.
Parameters:
sessionName - name of the session
text - text to wait for
sRow - start row
sCol - start column
eRow - end row
eCol - end column
timeout - timeout value
waitForInput - if true, will wait until OIA indicates session is ready for input.
caseSensitive - if true, the text will be case sensitive

isSessionActive

public boolean isSessionActive(java.lang.String sessionName)
Method which can be used to determine if the specified session is active.
Parameters:
sessionName - name of the session

startMacro1

public int startMacro1(java.lang.String macroName)
Method which can be used to start a macro on the current session.
Parameters:
macroName - name of the macro to play

startMacro2

public int startMacro2(java.lang.String sessionName,
                       java.lang.String macroName)
Method which can be used to start a macro on the specified session
Parameters:
sessionName - name of the session
macroName - name of the macro to play

getErrorMessage

public java.lang.String getErrorMessage()
Method which can be used to receive any error messages

callCustomerFunction

public java.lang.String callCustomerFunction(java.lang.String fncName,
                                             java.lang.String parms)
Method which can be used to extend the API to provide additional functionality. A function name can be passed in (eg. "showColorRemap") and then a list of parameters that can be parsed by the receiving function. Customers can use this api to implement their own custom Java Script API calls.