Extending : Client State Extension : Extending a Client State
  
Extending a Client State
Client state is an abstract state class which defines the general behaviors for client interaction. In UNICOM® Digital Transformation Toolkit (UDTT™), there is a default implementation of client state called ‘PopupPageClientState’. Alpha developers must customize their client state to fulfill their usage scenarios.
1 Implement state class.
UDTT has provided an abstract class named ‘com.ibm.btt.automaton.ext.ClientState’ to facilitate the alpha extension. This class is extended from the class of page state ‘com.ibm.btt.automaton.html.DSEHtmlState’, so alpha developers could focus more on the logics of client interaction and pay less attention on common state methods like ‘initializeFrom’. In extension usage scenario, there are 4 methods may be commonly extended by alpha developer in their application. For more information, please refer to Common State methods.
protected abstract String getCommand()
protected void afterFirstExecute()
protected void addRequiredDataToContext(Context context)
public String generateClientResponse()
2 Register the implementation class into btt.xml. To make the extended state class available during runtime, alpha developers should register it into the btt.xml of target application. So you need to open the btt.xml in your application project, and move to the ‘processor’ tab. Then, you can register your extended state class in the class table of processors. Please reference with the following screen shot.
This graphic is described in the surrounding text.
Go up to
Client State Extension