T-Plan Robot Enterprise 3.5.2
Build No. 3.5.2-20140701.1

com.tplan.robot.remoteclient.image
Class ImageClient

java.lang.Object
  extended by com.tplan.robot.remoteclient.AbstractRemoteDesktopClient
      extended by com.tplan.robot.remoteclient.image.ImageClient
All Implemented Interfaces:
Plugin, Configurable, Capability, ImageFreezeCapable, ImageOwner, KeyTransferCapable, PointerTransferCapable, PoolingCapable, ServerPropertyCapable, RemoteDesktopClient, PropertyChangeListener, EventListener

public class ImageClient
extends AbstractRemoteDesktopClient
implements PointerTransferCapable, KeyTransferCapable, Configurable, PoolingCapable, ImageFreezeCapable

Static image client allows to perform testing of images loaded from a file. The client supports all Java-compliant lossless image formats such as PNG, BMP, WBMP and GIF. The client accepts standard file URLs in form of "file://<image_path>". For example, to connect to an image at C:\testdata\images\test.png one would specify "Connect file://C:\testdata\images\test.png" in the test script or call the corresponding connect() method from the Java test class extending DefaultJavaTestScript.

The client has been extended in v2.3 to support loading of images packaged in a JAR file. The connect string format is in such a case "file://<JAR_file_path>!<image_path>". For example, to load an image called "screen.png" from a JAR file "C:\testdata\images.jar" where the image is zipped into a folder called "examples" use "Connect file://C:\testdata\images.jar!/examples/screen.png".

Version 2.3 also supports images specified relatively to the Robot's install folder (to the location of robot.jar). For example, to connect to image screen.png stored in the install folder one may use an URL like "file://screen.png".

As there's a mechanism causing the client to reload the image when the file gets updated, the client may be also used to interface with applications generating graphical output to an image in the file system. The client keeps checking the image file for size and time stamp and reloads automatically when a change is detected. This behavior is connected in the client preferences (see the Preference window in the GUI).

The client by default refuses key events and makes the GUI report a syntax error on any the Press, Type or Typeline commands specified in the test script. This is is intended to make it clear that static images do not consume any key events. To suppress this behavior and make the client consume key events (and discard them silently) see the client preferences.


T-Plan Robot Enterprise, (C) 2009-2014 T-Plan Limited. All rights reserved.


Field Summary
static String CONGIG_KEY_DUMMY_KEY_SUPPORT
           
static String CONGIG_KEY_ENABLE_POOLING
           
static String CONGIG_KEY_LAST_FILE
           
static String CONGIG_KEY_READ_TIME_MS
           
static String CONGIG_KEY_REFRESH_ON_SIZE_CHANGE
           
static String CONGIG_KEY_REFRESH_PERIOD_MS
           
 
Fields inherited from class com.tplan.robot.remoteclient.AbstractRemoteDesktopClient
serverProperties
 
Fields inherited from interface com.tplan.robot.remoteclient.RemoteDesktopClient
LOGIN_PARAM_PASSWORD, LOGIN_PARAM_URI, LOGIN_PARAM_USER
 
Constructor Summary
ImageClient()
           
 
Method Summary
 boolean canFreeze()
          This method allows the implementing clients to disable freezing dynamically.
 void checkDependencies(PluginManager manager)
          Check whether the current product installation contains all dependencies (other plugins) required to install this plugin.
 void clientPooled()
          This method is called when the client is pooled and made ready for reuse.
 void clientReused()
          This method is called when the client is picked up from the pool by a new test scripts.
 Thread close()
          Close the connection to the RFB server.
 Thread connect()
          Connect the client to the specified host.
 void destroy()
          Destroy the client and make it ready for garbage collection.
 String getCode()
          Get plugin code.
 String getConnectString()
          Get the connect string (URL).
 Date getDate()
          Get plugin release date.
 int getDefaultPort()
          Get the default server port.
 String getDescription()
          Get plugin description to be displayed in the GUI.
 int getDesktopHeight()
          Get the remote desktop height.
 String getDesktopName()
          Get the remote desktop name.
 int getDesktopWidth()
          Get the remote desktop width.
 String getDisplayName()
          Get short plugin name to be displayed in the GUI.
 String getHost()
          Get the server host name.
 Image getImage()
          Get the remote desktop image.
 Class getImplementedInterface()
          Get Class of the exposed functional interface that this plugin implements.
 MouseEvent getLastMouseEvent()
          This is a convenience method allowing to track the mouse pointer coordinates.
 List<Preference> getLoginParamsSpecification()
          Get the list of login parameters (parameters).
 int[] getLowestSupportedVersion()
          Get the lowest required version of T-Plan Robot Enterprise.
 String getMessageAfterInstall()
          Get text of a message to be displayed after installation of this plugin.
 String getMessageBeforeInstall()
          Get text of a message to be displayed before installation of this plugin.
 String getPassword()
          Get the password.
 int getPort()
          Get the port of the target RFB server.
 List<Preference> getPreferences()
          Get metadata of displayable/editable configurable parameters.
 String getProtocol()
          Get the protocol and eventually version supported by the client.
 String getSupportContact()
          Get support contact.
 String getUniqueId()
          Get unique ID associated with the plugin.
 String getUser()
          Get the user.
 String getVendorHomePage()
          Get the vendor home page.
 String getVendorName()
          Get vendor (provider) name to be displayed in the GUI.
 int[] getVersion()
          Get plugin version in form of an integer array.
 boolean hasSufficientConnectInfo()
          Indicate whether the client has sufficient connect information or not.
 boolean isConnected()
          Should indicate whether the client is connected to an RFB server, i.e.
 boolean isConnectedTo(String connectString)
          Test whether this client is connected to a desktop identified by a particular URL (connect string).
 boolean isConnecting()
          Should indicate whether the client is currently connecting to an RFB server but the communication hasn't passed the authentication and init phases, i.e.
 boolean isConsoleMode()
          Indicates if the client runs in the console or GUI mode.
 boolean isFreeze()
          Get the current status.
 boolean isKeyTransferSupported()
          Allows to switch dynamically support of key events.
 boolean isLocalDisplay()
          Find out whether the client is connected to the local display.
 boolean isPointerTransferSupported()
          Allows to switch dynamically support of pointer events.
 boolean isPoolingCapable()
          Define whether the client can be pooled at the moment or not.
 boolean isStatic()
          The client is by default considered dynamic (the method returns false).
 boolean requiresRestart()
          Indicate whether installation of this plugin requires application restart.
 void sendClientCutText(String text)
          Implementation of the ClientCutText client-to-server RFB v3.3 message.
 void sendKeyEvent(KeyEvent evt)
          Dummy method to consume key events.
 void sendPointerEvent(MouseEvent evt, boolean sendModifiers)
          Send a pointer event to the server.
 void setConfiguration(UserConfiguration cfg)
          If an object implementing this interface is a plugin (i.e.
 void setConsoleMode(boolean consoleMode)
          Set the console mode flag.
 void setFreeze(boolean freeze)
          Freeze or resume.
 void setLoginParams(Map<String,Object> params)
          Set the client login parameter values.
 
Methods inherited from class com.tplan.robot.remoteclient.AbstractRemoteDesktopClient
addClientListener, addServerListener, fireRemoteClientEvent, fireRemoteServerEvent, getServerProperties, isActivelyUpdating, propertyChange, removeClientListener, removeServerListener, setServerProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONGIG_KEY_LAST_FILE

public static final String CONGIG_KEY_LAST_FILE
See Also:
Constant Field Values

CONGIG_KEY_REFRESH_ON_SIZE_CHANGE

public static final String CONGIG_KEY_REFRESH_ON_SIZE_CHANGE
See Also:
Constant Field Values

CONGIG_KEY_REFRESH_PERIOD_MS

public static final String CONGIG_KEY_REFRESH_PERIOD_MS
See Also:
Constant Field Values

CONGIG_KEY_READ_TIME_MS

public static final String CONGIG_KEY_READ_TIME_MS
See Also:
Constant Field Values

CONGIG_KEY_DUMMY_KEY_SUPPORT

public static final String CONGIG_KEY_DUMMY_KEY_SUPPORT
See Also:
Constant Field Values

CONGIG_KEY_ENABLE_POOLING

public static final String CONGIG_KEY_ENABLE_POOLING
See Also:
Constant Field Values
Constructor Detail

ImageClient

public ImageClient()
Method Detail

isLocalDisplay

public boolean isLocalDisplay()
Description copied from interface: RemoteDesktopClient

Find out whether the client is connected to the local display. By "local display" we mean the very same desktop displayed on the local display device (such as users's computer screen). An example of a local display is VNC server running on Windows or Java client connected directly to the system desktop buffer. On contrary, VNC servers running on ports 5901 and higher on a local Linux/Unix machine (localhost:1, localhost:2,...) must not be considered local by this method.

Value returned by this method affects behavior of the T-Plan Robot Enterprise GUI. If the display is local, the viewer doesn't display the desktop image because it would lead to recursive image (infinite mirroring effect). When a test script is executed on the local display, the GUI minimizes in order to hide from eventual screenshots.

Specified by:
isLocalDisplay in interface RemoteDesktopClient
Returns:
true if the client is connected to a local display, false if not.

getProtocol

public String getProtocol()
Description copied from interface: RemoteDesktopClient
Get the protocol and eventually version supported by the client.

Specified by:
getProtocol in interface RemoteDesktopClient
Returns:
Protocol version in the format defined by the protocol.

getHost

public String getHost()
Description copied from interface: RemoteDesktopClient
Get the server host name. If the name hasn't been set through setHost(), the method returns null.

Specified by:
getHost in interface RemoteDesktopClient
Returns:
Server host name (can be both name or IP address).

getPort

public int getPort()
Description copied from interface: RemoteDesktopClient
Get the port of the target RFB server. Note that it is the real port, not the display number. If you are connecting e.g. to a server called myserver.mydomain.com:2, the port is 5902.

Specified by:
getPort in interface RemoteDesktopClient
Returns:
RFB server port number.

getDefaultPort

public int getDefaultPort()
Description copied from interface: RemoteDesktopClient
Get the default server port. For RFB (VNC) it is 5900 while RDP uses 3389.

Specified by:
getDefaultPort in interface RemoteDesktopClient
Returns:
default port number.

getPassword

public String getPassword()
Description copied from interface: RemoteDesktopClient
Get the password. If the password hasn't been set through setPassword(), the method returns null.

Specified by:
getPassword in interface RemoteDesktopClient
Returns:
Password for authentication to the RFB server.

getUser

public String getUser()
Description copied from interface: RemoteDesktopClient
Get the user. If the user name hasn't been set through RemoteDesktopClient.setLoginParams(java.util.Map), the method returns null.

Specified by:
getUser in interface RemoteDesktopClient
Returns:
user name for authentication to the RFB server.

getDesktopWidth

public int getDesktopWidth()
Description copied from interface: RemoteDesktopClient
Get the remote desktop width. If the client is not connected to a server, the method should return zero.

Specified by:
getDesktopWidth in interface RemoteDesktopClient
Returns:
Remote desktop width or zero if not connected.

getDesktopHeight

public int getDesktopHeight()
Description copied from interface: RemoteDesktopClient
Get the remote desktop height. If the client is not connected to any RFB server, the method should return zero.

Specified by:
getDesktopHeight in interface RemoteDesktopClient
Returns:
Remote desktop width or zero if not connected.

getDesktopName

public String getDesktopName()
Description copied from interface: RemoteDesktopClient
Get the remote desktop name. If the client is not connected to any RFB server, the method should return null or an empty string.

Specified by:
getDesktopName in interface RemoteDesktopClient
Returns:
Remote desktop width or null or empty string if not connected.

isConsoleMode

public boolean isConsoleMode()
Description copied from interface: RemoteDesktopClient
Indicates if the client runs in the console or GUI mode. In the console mode all log messages should be printed out to the standard output.

In GUI mode the client should rather fire the messages to all registered RfbServerListener instances. The GUI components should then report the messages in an appropriate way.

Specified by:
isConsoleMode in interface RemoteDesktopClient
Returns:
true if the client runs in CLI mode, false if in GUI mode.

setConsoleMode

public void setConsoleMode(boolean consoleMode)
Description copied from interface: RemoteDesktopClient
Set the console mode flag.

Specified by:
setConsoleMode in interface RemoteDesktopClient
Parameters:
consoleMode - false indicates that the application runs in GUI mode, true indicates CLI one.

getLastMouseEvent

public MouseEvent getLastMouseEvent()
Description copied from interface: RemoteDesktopClient
This is a convenience method allowing to track the mouse pointer coordinates. The client is expected to cache the last mouse event sent by the sendMouseEvent() and return it through this method.

Specified by:
getLastMouseEvent in interface RemoteDesktopClient
Returns:
The last mouse event sent to the server.

getImage

public Image getImage()
Description copied from interface: RemoteDesktopClient
Get the remote desktop image. The client should maintain an off screen image (e.g. a BufferedImage instance) and synchronize it with the updates received in the FrameBufferUpdate server messages.

Specified by:
getImage in interface RemoteDesktopClient
Returns:
Remote desktop image.

isConnected

public boolean isConnected()
Description copied from interface: RemoteDesktopClient
Should indicate whether the client is connected to an RFB server, i.e. if there's an active connection which has already passed the authentication and init phase (after ServerInit message is received from the server).

Specified by:
isConnected in interface RemoteDesktopClient
Returns:
true if there's an active connection, false if not.

isConnecting

public boolean isConnecting()
Description copied from interface: RemoteDesktopClient
Should indicate whether the client is currently connecting to an RFB server but the communication hasn't passed the authentication and init phases, i.e. it is in the process of initial handshake, authentication or exchange of session parameters.

Specified by:
isConnecting in interface RemoteDesktopClient

connect

public Thread connect()
               throws Exception,
                      PasswordRequiredException
Description copied from interface: RemoteDesktopClient
Connect the client to the specified host.

Specified by:
connect in interface RemoteDesktopClient
Throws:
Exception
PasswordRequiredException

hasSufficientConnectInfo

public boolean hasSufficientConnectInfo()
Description copied from interface: RemoteDesktopClient
Indicate whether the client has sufficient connect information or not. If false is returned, the tool will display the Login dialog (in GUI mode) or reports an error (in CLI mode).

Specified by:
hasSufficientConnectInfo in interface RemoteDesktopClient
Returns:
true if the client has sufficient data to establish a connection to the desktop, false if not.

close

public Thread close()
             throws IOException
Description copied from interface: RemoteDesktopClient

Close the connection to the RFB server. If there's no connection, the method should do nothing.

Specified by:
close in interface RemoteDesktopClient
Throws:
IOException

sendClientCutText

public void sendClientCutText(String text)
                       throws IOException
Description copied from interface: RemoteDesktopClient
Implementation of the ClientCutText client-to-server RFB v3.3 message. The method is supposed to send the update of the local clipboard to the server.

Specified by:
sendClientCutText in interface RemoteDesktopClient
Parameters:
text - content of the local clipboard.
Throws:
IOException

getLoginParamsSpecification

public List<Preference> getLoginParamsSpecification()
Description copied from interface: RemoteDesktopClient
Get the list of login parameters (parameters). This is a generic mechanism allowing the client to declare a custom list of input arguments required to connect to the server, such as server name, user name, password, certificate file name etc. This data is used by the Login dialog to display corresponding GUI controls.

Specified by:
getLoginParamsSpecification in interface RemoteDesktopClient
Returns:
list of required login arguments.

setLoginParams

public void setLoginParams(Map<String,Object> params)
Description copied from interface: RemoteDesktopClient

Set the client login parameter values. This is the entry point to specify connection URI (parameter name RemoteDesktopClient.LOGIN_PARAM_URI), user name (RemoteDesktopClient.LOGIN_PARAM_USER) and password (RemoteDesktopClient.LOGIN_PARAM_PASSWORD). The client is expected to parse the URI for the host name and port number to be returned by the RemoteDesktopClient.getHost() and RemoteDesktopClient.getPort() methods. The point is to let the client to provide default values when the URI doesn't contain them.

Save for these standard parameters listed above the table can be populated with any other protocol specific parameters understood by the client. Any such parameter should be declared through the RemoteDesktopClient.getLoginParamsSpecification() method to make the Login Dialog to display an appropriate GUI component and allow user to enter a parameter value.

Custom parameters can be also passed through the --clientparam CLI option. Any such instance will be parsed and passed to the client through this method.

Specified by:
setLoginParams in interface RemoteDesktopClient
Parameters:
params - map of the [parameter name, parameter value] pairs.

getCode

public String getCode()
Description copied from interface: Plugin

Get plugin code. This string serves as an identifier of the functionality delivered by the plugin. For example, desktop client plugins return protocol name like "RFB" or "RDP" as their code.

Plugin code is used by pluggable instance factories to identify a particular plugin. It may be used to replace internal plugins with third party code. For example if you develop a class which implements this and the com.tplan.robot.remoteclient.RemoteDesktop interfaces and the getCode() method returns "RFB", it will replace the internal implementation of the RFB (VNC) client.

Specified by:
getCode in interface Plugin
Returns:
plugin code (identifier). The name must not be null.

getDisplayName

public String getDisplayName()
Description copied from interface: Plugin
Get short plugin name to be displayed in the GUI.

Specified by:
getDisplayName in interface Plugin
Returns:
short plugin name.

getDescription

public String getDescription()
Description copied from interface: Plugin
Get plugin description to be displayed in the GUI.

Specified by:
getDescription in interface Plugin
Returns:
plugin description. May be null.

getVendorName

public String getVendorName()
Description copied from interface: Plugin
Get vendor (provider) name to be displayed in the GUI.

Specified by:
getVendorName in interface Plugin
Returns:
vendor name. May be null.

getSupportContact

public String getSupportContact()
Description copied from interface: Plugin
Get support contact. If the contact is a valid mail link like "mailto:<mailaddress>" or an HTTP link like "http://<link>", the application may follow it with appropriate program (mail client or web browser).

Specified by:
getSupportContact in interface Plugin
Returns:
support contact. May be null or a text to be displayed by the GUI or a valid URI.

getVersion

public int[] getVersion()
Description copied from interface: Plugin
Get plugin version in form of an integer array. Major version numbers are first. For example, version 1.2.3 should be represented as new int[] { 1, 2, 3 }.

Specified by:
getVersion in interface Plugin
Returns:
version number.

getImplementedInterface

public Class getImplementedInterface()
Description copied from interface: Plugin
Get Class of the exposed functional interface that this plugin implements. For example remote desktop clients return com.tplan.robot.remoteclient.RemoteDesktopClient.class.

Specified by:
getImplementedInterface in interface Plugin
Returns:
class instance of the implemented functional interface.

requiresRestart

public boolean requiresRestart()
Description copied from interface: Plugin
Indicate whether installation of this plugin requires application restart. If it returns true, users are asked to restart after plugin installation via GUI.

Specified by:
requiresRestart in interface Plugin
Returns:
true if installation of the plugin requires application restart, false otherwise.

getVendorHomePage

public String getVendorHomePage()
Description copied from interface: Plugin
Get the vendor home page. If the contact is a valid HTTP link like "http://<link>", the application may follow it with appropriate program (typically web browser).

Specified by:
getVendorHomePage in interface Plugin
Returns:
vendor home page URL.

getDate

public Date getDate()
Description copied from interface: Plugin
Get plugin release date.

Specified by:
getDate in interface Plugin
Returns:
plugin release date.

getUniqueId

public String getUniqueId()
Description copied from interface: Plugin

Get unique ID associated with the plugin. The plugin manager uses the ID together with the version string to identify whether a plugin is already installed and whether a newer version of the same plugin is available.

The unique ID in fact identifies a particular plugin delivered by a particular vendor. Plugin developers are recommended to choose an ID and keep it constant for all versions of one particular plugin. The ID is never displayed in the GUI so it doesn't have to be a readable text. To avoid conflicts with other vendors it is recommended to elaborate vendor or author name and feature description into the ID, for example "custom RFB client implemented by John Doe".

Specified by:
getUniqueId in interface Plugin
Returns:
unique plugin ID.

getLowestSupportedVersion

public int[] getLowestSupportedVersion()
Description copied from interface: Plugin
Get the lowest required version of T-Plan Robot Enterprise. If user attempts to install the plugin on a lower version, an error is reported.

Specified by:
getLowestSupportedVersion in interface Plugin
Returns:
the lowest T-Plan Robot Enterprise version supported by this plugin.

getMessageBeforeInstall

public String getMessageBeforeInstall()
Description copied from interface: Plugin
Get text of a message to be displayed before installation of this plugin. It may contain any relevant user information.

Specified by:
getMessageBeforeInstall in interface Plugin
Returns:
message to be displayed before installation.

getMessageAfterInstall

public String getMessageAfterInstall()
Description copied from interface: Plugin
Get text of a message to be displayed after installation of this plugin. It may contain any relevant user information.

Specified by:
getMessageAfterInstall in interface Plugin
Returns:
message to be displayed after installation.

checkDependencies

public void checkDependencies(PluginManager manager)
                       throws DependencyMissingException
Description copied from interface: Plugin
Check whether the current product installation contains all dependencies (other plugins) required to install this plugin. This method is called before the plugin is installed and it should throw a DependencyMissingException if one or more dependencies are missing.

Specified by:
checkDependencies in interface Plugin
Parameters:
manager - shared instance of the plugin manager.
Throws:
DependencyMissingException - when one or more dependencies requested by this plugin is missing.

isPointerTransferSupported

public boolean isPointerTransferSupported()
Description copied from interface: PointerTransferCapable
Allows to switch dynamically support of pointer events.

Specified by:
isPointerTransferSupported in interface PointerTransferCapable
Returns:
true if the desktop supports pointer events, false if not.

sendPointerEvent

public void sendPointerEvent(MouseEvent evt,
                             boolean sendModifiers)
                      throws IOException
Description copied from interface: PointerTransferCapable
Send a pointer event to the server.

Specified by:
sendPointerEvent in interface PointerTransferCapable
Parameters:
evt - a mouse event.
sendModifiers - true sends modifiers like Ctrl or Alt, false not.
Throws:
IOException - if an I/O error happens in the client-server communication.

destroy

public void destroy()
Description copied from class: AbstractRemoteDesktopClient
Destroy the client and make it ready for garbage collection.

Specified by:
destroy in interface RemoteDesktopClient
Overrides:
destroy in class AbstractRemoteDesktopClient

getConnectString

public String getConnectString()
Description copied from interface: RemoteDesktopClient
Get the connect string (URL). It typically contains protocol, host name and optional port. The connect string must uniquely identify the connected desktop (or desktop this client is initialized to connect to).

Specified by:
getConnectString in interface RemoteDesktopClient
Returns:
connect string (URI), for example "rfb://fox.mydomain.com:5901".

isConnectedTo

public boolean isConnectedTo(String connectString)
Description copied from interface: RemoteDesktopClient
Test whether this client is connected to a desktop identified by a particular URL (connect string). The method should for example check whether the referred host and port is the same (if applicable). For example, if the client is a VNC one and is connected to "localhost:1", the method should return true when the argument is "rfb://127.0.0.1:5901" because the URL refers to the same host and port.

Specified by:
isConnectedTo in interface RemoteDesktopClient
Overrides:
isConnectedTo in class AbstractRemoteDesktopClient
Parameters:
connectString - an URL (connect string).
Returns:
true if the client is connected to the connect string

isStatic

public boolean isStatic()
Description copied from class: AbstractRemoteDesktopClient
The client is by default considered dynamic (the method returns false). Override this method for static image clients.

Specified by:
isStatic in interface ImageOwner
Overrides:
isStatic in class AbstractRemoteDesktopClient
Returns:
false by default.

setConfiguration

public void setConfiguration(UserConfiguration cfg)
Description copied from interface: Configurable

If an object implementing this interface is a plugin (i.e. implements also the Plugin interface) and is instantiated through a supported plugin factory, the Plugin Manager calls this method right after an instance of this object is created.

Custom objects which do not already have their configuration parameters in the default configuration file should take advantage of this method to store their configuration into the shared User Configuration instance. It is recommended to call the UserConfiguration.saveConfiguration() method in the end to save the configuration to the hard drive.

Objects wishing to be notified of changes of configuration parameters should implement the ConfigurationChangeListener interface and register with the UserConfiguration instance through the addConfigurationChangeListener() method.

Specified by:
setConfiguration in interface Configurable
Parameters:
cfg - global shared instance of user configuration preloaded with parameters from the default and user configuration files.

getPreferences

public List<Preference> getPreferences()
Description copied from interface: Configurable
Get metadata of displayable/editable configurable parameters. This method should declare a list of metadata for all configurable parameters which may be editable in the GUI. If the returned list is not null and contains at least one parameter, it gets picked up by the Preferences dialog which creates a panel with GUI components allowing to edit the declared configuration parameters.

Specified by:
getPreferences in interface Configurable
Returns:
a list of metadata for all public editable configuration parameters.

isKeyTransferSupported

public boolean isKeyTransferSupported()
Description copied from interface: KeyTransferCapable
Allows to switch dynamically support of key events.

Specified by:
isKeyTransferSupported in interface KeyTransferCapable
Returns:
true if the desktop supports key events, false if not.

sendKeyEvent

public void sendKeyEvent(KeyEvent evt)
                  throws IOException
Dummy method to consume key events.

Specified by:
sendKeyEvent in interface KeyTransferCapable
Parameters:
evt - a key event
Throws:
IOException - declared but never thrown because the image client discards any key events.

isPoolingCapable

public boolean isPoolingCapable()
Description copied from interface: PoolingCapable
Define whether the client can be pooled at the moment or not. Though most implementations will always return true, the method allows to disable pooling based on dynamic factors. Note that this method is checked by the connection pool only when the client is about to be pooled and it has no effect on clients which are already in the pool.

Specified by:
isPoolingCapable in interface PoolingCapable
Returns:
boolean if the object is momentarily suitable for pooling, false if not.

clientPooled

public void clientPooled()
Description copied from interface: PoolingCapable
This method is called when the client is pooled and made ready for reuse. The client is expected to fire a RemoteDesktopServerEvent event to notify its listeners that the connection was pooled.

Specified by:
clientPooled in interface PoolingCapable

clientReused

public void clientReused()
Description copied from interface: PoolingCapable
This method is called when the client is picked up from the pool by a new test scripts. This method allows the client to do anything necessary, for example refresh the screen image or check for updates.

Specified by:
clientReused in interface PoolingCapable

canFreeze

public boolean canFreeze()
Description copied from interface: ImageFreezeCapable
This method allows the implementing clients to disable freezing dynamically.

Specified by:
canFreeze in interface ImageFreezeCapable
Returns:
true if freezing is supported and enabled, false if not.

setFreeze

public void setFreeze(boolean freeze)
Description copied from interface: ImageFreezeCapable
Freeze or resume. When freezing (the argument is true the image should stop updating and become still. When resuming (the argument is false the image should refresh the image and resume the update process.

Specified by:
setFreeze in interface ImageFreezeCapable
Parameters:
freeze - true freezes the image, false resumes.

isFreeze

public boolean isFreeze()
Description copied from interface: ImageFreezeCapable
Get the current status.

Specified by:
isFreeze in interface ImageFreezeCapable
Returns:
true if the image is frozen, false if not.

T-Plan Robot Enterprise 3.5.2
Build No. 3.5.2-20140701.1