com.ibm.jtopenlite.command.program
Class ProgramAdapter
- java.lang.Object
-
- com.ibm.jtopenlite.command.program.ProgramAdapter
-
-
Constructor Summary
Constructors Modifier Constructor and Description protectedProgramAdapter(java.lang.String library, java.lang.String name, int numberOfParameters)
-
Method Summary
Methods Modifier and Type Method and Description intgetNumberOfParameters()Returns the number of parameters for this program.byte[]getParameterInputData(int parmIndex)Returns the input data of the parameter at the specified index.intgetParameterInputLength(int parmIndex)Returns the input length of the parameter at the specified index.intgetParameterOutputLength(int parmIndex)Returns the output length of the parameter at the specified index.intgetParameterType(int parmIndex)Returns the type of parameter at the specified index.java.lang.StringgetProgramLibrary()Returns the library of the program object.java.lang.StringgetProgramName()Returns the name of the program object.byte[]getTempDataBuffer()The implementor can create their own temp byte array for the output parameter size and reuse it each time a call is performed, or for more than one parameter on the same call.voidnewCall()Invoked before any other methods on this interface by CommandConnection whenever this Program is called.voidsetParameterOutputData(int parmIndex, byte[] tempData, int maxLength)Sets the output data for the parameter at the specified index.
-
-
-
Constructor Detail
-
ProgramAdapter
protected ProgramAdapter(java.lang.String library, java.lang.String name, int numberOfParameters)
-
-
Method Detail
-
newCall
public final void newCall()
Description copied from interface:ProgramInvoked before any other methods on this interface by CommandConnection whenever this Program is called.
-
getProgramLibrary
public final java.lang.String getProgramLibrary()
Description copied from interface:ProgramReturns the library of the program object.- Specified by:
getProgramLibraryin interfaceProgram
-
getProgramName
public final java.lang.String getProgramName()
Description copied from interface:ProgramReturns the name of the program object.- Specified by:
getProgramNamein interfaceProgram
-
getNumberOfParameters
public final int getNumberOfParameters()
Description copied from interface:ProgramReturns the number of parameters for this program.- Specified by:
getNumberOfParametersin interfaceProgram
-
getParameterType
public final int getParameterType(int parmIndex)
Description copied from interface:ProgramReturns the type of parameter at the specified index.- Specified by:
getParameterTypein interfaceProgram- See Also:
Parameter
-
getParameterInputLength
public final int getParameterInputLength(int parmIndex)
Description copied from interface:ProgramReturns the input length of the parameter at the specified index.- Specified by:
getParameterInputLengthin interfaceProgram
-
getParameterOutputLength
public final int getParameterOutputLength(int parmIndex)
Description copied from interface:ProgramReturns the output length of the parameter at the specified index.- Specified by:
getParameterOutputLengthin interfaceProgram
-
getParameterInputData
public final byte[] getParameterInputData(int parmIndex)
Description copied from interface:ProgramReturns the input data of the parameter at the specified index.- Specified by:
getParameterInputDatain interfaceProgram
-
setParameterOutputData
public final void setParameterOutputData(int parmIndex, byte[] tempData, int maxLength)Description copied from interface:ProgramSets the output data for the parameter at the specified index.- Specified by:
setParameterOutputDatain interfaceProgram
-
getTempDataBuffer
public final byte[] getTempDataBuffer()
Description copied from interface:ProgramThe implementor can create their own temp byte array for the output parameter size and reuse it each time a call is performed, or for more than one parameter on the same call. The implementor can choose to ignore this, and simply return null. The command connection checks to see if the buffer returned by this method is not null and large enough to accommodate the output parameter size.- Specified by:
getTempDataBufferin interfaceProgram
-
-