HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.common.customlogic
Class HatsCustomListener

java.lang.Object
  extended by com.ibm.hats.common.customlogic.HatsCustomListener
All Implemented Interfaces:
MacroCustomActionListener, ECLCustomRecoListener, Serializable, EventListener

public class HatsCustomListener
extends Object
implements ECLCustomRecoListener, MacroCustomActionListener, Serializable

Class Name: HatsCustomListener
Class Type:
Normal
Base Class:
None
Intf Class:
ECLCustomRecoListener, MacroCustomActionListener
Description:
This class acts as a dispatcher service such that there need be only one listener for all custom events and allows addition of HATS business logic. This class wll parse out the custom logic class and settings from the events and call and forward the settings to the specified class, and then relay the results to the Host On Demand facilities.

See Also:
Serialized Form

Field Summary
static String CLASSNAME
          The fully-qualified name of this class.
static String HATSCUSTOMSCREENRECOCLASSFROMSETTINGSSEPERATOR
          String constant hats custom recognition seperator of class and settings.
static String HATSCUSTOMSCREENRECOCLASSNOSETTINGS
          String constant hats custom recognition equivalent of no settings, "".
static String HATSGLOBALVARIABLECUSTOMSCREENRECOALIAS
          String constant hats global variable screen reco name within the tag to listen for.
static String HATSGLOBALVARIABLECUSTOMSCREENRECOFULLCLASS
          String constant hats global variable screen reco class name.
 
Constructor Summary
HatsCustomListener()
          The default constructor.
HatsCustomListener(com.ibm.hats.runtime.ApplicationSpecificInfo asi)
          Runtime constructor.
 
Method Summary
 boolean DoReco(ECLCustomRecoEvent recoEvt)
          Do the recognition.
 void execute(MacroCustomActionEvent mcaEvt)
           
static String getClassFromID(String id)
          Retrieves the class name of the class to recieve the listened event from the ID string of the Do Reco event.
static String getLabelFromID(String id, String separator)
          Retrieves the label from the ID string of the Do Reco event.
static String getSettingFromID(String id)
          Retrieves the settings from the ID string of the Do Reco event.
 void halt(MacroCustomActionEvent mcaEvt)
          Halt the action.
 boolean isBIDIReverse()
          This fuction is used to check if the orientation of the screen is different than the orientation of the screen captured, if so it will reverse the descriptior for the screen captured to match those coming from the host.
 void releaseHodConn()
          Releases the HodConn Object from the custom code.
 void setBIDIReverse(boolean flag)
          Sets the BIDI reverse.
 void setHodConn(com.ibm.hats.runtime.connmgr.HodConn conn)
          Sets the HodConn object in the custom code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

public static final String CLASSNAME
The fully-qualified name of this class. This is used for controlling and displaying traces.


HATSGLOBALVARIABLECUSTOMSCREENRECOALIAS

public static final String HATSGLOBALVARIABLECUSTOMSCREENRECOALIAS
String constant hats global variable screen reco name within the tag to listen for.

See Also:
Constant Field Values

HATSGLOBALVARIABLECUSTOMSCREENRECOFULLCLASS

public static final String HATSGLOBALVARIABLECUSTOMSCREENRECOFULLCLASS
String constant hats global variable screen reco class name.

See Also:
Constant Field Values

HATSCUSTOMSCREENRECOCLASSFROMSETTINGSSEPERATOR

public static final String HATSCUSTOMSCREENRECOCLASSFROMSETTINGSSEPERATOR
String constant hats custom recognition seperator of class and settings.

See Also:
Constant Field Values

HATSCUSTOMSCREENRECOCLASSNOSETTINGS

public static final String HATSCUSTOMSCREENRECOCLASSNOSETTINGS
String constant hats custom recognition equivalent of no settings, "".

See Also:
Constant Field Values
Constructor Detail

HatsCustomListener

public HatsCustomListener(com.ibm.hats.runtime.ApplicationSpecificInfo asi)
Runtime constructor.

Parameters:
asi - Application level infomration for the running user.

HatsCustomListener

public HatsCustomListener()
The default constructor.

Method Detail

DoReco

public boolean DoReco(ECLCustomRecoEvent recoEvt)
Do the recognition.

Specified by:
DoReco in interface ECLCustomRecoListener
Parameters:
recoEvt - The ECLCustomRecoEvent object.
Returns:
True if recognized, false otherwise.

getClassFromID

public static String getClassFromID(String id)
Retrieves the class name of the class to recieve the listened event from the ID string of the Do Reco event.

Parameters:
id - The string of the ID field in the tag.
Returns:
The name of the class.

getLabelFromID

public static String getLabelFromID(String id,
                                    String separator)
Retrieves the label from the ID string of the Do Reco event.

Parameters:
id - The string of the ID field in the tag.
separator - The String to separate the data with.
Returns:
The name of the class.

getSettingFromID

public static String getSettingFromID(String id)
Retrieves the settings from the ID string of the Do Reco event.

Parameters:
id - The string of the ID field in the tag.
Returns:
The name of the class.

setHodConn

public void setHodConn(com.ibm.hats.runtime.connmgr.HodConn conn)
Sets the HodConn object in the custom code.

Parameters:
conn - The HodConn Object.

releaseHodConn

public void releaseHodConn()
Releases the HodConn Object from the custom code.


execute

public void execute(MacroCustomActionEvent mcaEvt)
Specified by:
execute in interface MacroCustomActionListener
Parameters:
mcaEvt - The MacroCustonActionEvent object.
See Also:
MacroCustomActionListener.execute( MacroCustomActionEvent )

halt

public void halt(MacroCustomActionEvent mcaEvt)
Halt the action.

Specified by:
halt in interface MacroCustomActionListener
Parameters:
mcaEvt - The MacroCustomActionEvent object.
See Also:
MacroCustomActionListener.halt(MacroCustomActionEvent)

isBIDIReverse

public boolean isBIDIReverse()
This fuction is used to check if the orientation of the screen is different than the orientation of the screen captured, if so it will reverse the descriptior for the screen captured to match those coming from the host. This support is mainly for compare Region to value criterion.

Returns:
Returns true if reverse, false otherwise.

setBIDIReverse

public void setBIDIReverse(boolean flag)
Sets the BIDI reverse.

Parameters:
flag - Boolean flag setting BIDI reverse.

HATS 7.5.1 (201005110649)