All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.hi.customizer.beans.scci.SCFactory

java.lang.Object
   |
   +----com.ibm.hi.customizer.beans.scci.SCFactory

public class SCFactory
extends Object
SCFactory should be used to create objects to use with the CCI API. Currently the only objects available for dynamic creation are SCMacroCommand and SCMacro. All creation methods are static.

Examples:

to create a SCMacro that sends the "F1" host function key and executes no SCMacroCommands, use:

 SCMacro macro1 = SCFactory.createMacro(null, SCMacro.F1_STR);  //pass in null for the SCMacroCommands Vector
 
to create a SCMacro to start a user applet called "testApplet" and sends no functionKey, use:
 java.util.Vector v1 = new Vector();  //create a vector to contain SCMacroCommands
 v1.addElement(SCFactory.createMacroCommand(SCMacroCommand.RUN_APPLET, "testApplet")); //run applet
 SCMacro macro2 = SCFactory.createMacro(v1, null); //pass in null for the functionKey
 
to create a SCMacro that starts an applet, opens a new session, and sends a user name, password, and the "Enter" functionKey, use:
 java.util.Vector v2 = new Vector();  //create a vector to contain SCMacroCommands
 v2.addElement(SCFactory.createMacroCommand(SCMacroCommand.RUN_APPLET, "testApplet"));    //run applet
 v2.addElement(SCFactory.createMacroCommand(SCMacroCommand.NEW_SESSION, null));           //start a new session
 v2.addElement(SCFactory.createMacroCommand(SCMacroCommand.NO_COMMAND, "user", 1536, 8)); //send user name
 v2.addElement(SCFactory.createMacroCommand(SCMacroCommand.NO_COMMAND, "pass", 1630, 8)); //send password
 SCMacro macro3 = SCFactory.createMacro(v2, SCMacro.ENTER_STR);                           //send Enter key
 

See Also:
SCMacro, SCMacroCommand

Constructor Index

 o SCFactory()

Method Index

 o createMacro(Vector, String)
 o createMacroCommand(int, String)
 o createMacroCommand(int, String, int, int)

Constructors

 o SCFactory
 public SCFactory()

Methods

 o createMacroCommand
 public static SCMacroCommand createMacroCommand(int commandType,
                                                 String argument)
Parameters:
commandType - type of command, see SCMacroCommand for commandType definitions.
argument - the argument required for some commandTypes, pass in null for no argument
See Also:
SCMacroCommand
 o createMacroCommand
 public static SCMacroCommand createMacroCommand(int commandType,
                                                 String argument,
                                                 int position,
                                                 int length)
Parameters:
commandType - type of command, see SCMacroCommand for commandType definitions.
argument - the argument required for some commandTypes, pass in null for no argument
position - the host position
length - the host length
See Also:
SCMacroCommand
 o createMacro
 public static SCMacro createMacro(Vector commands,
                                   String functionKey)
Parameters:
commands - a java.util.Vector of SCMacroCommands
functionKey - the function key to send after executing all the SCMacroCommands, see SCMacro for functionKey definitions
See Also:
createMacroCommand, SCMacroCommand, SCMacro

All Packages  Class Hierarchy  This Package  Previous  Next  Index