com.ibm.jtopenlite.command.program
Class ProgramAdapter

java.lang.Object
  extended by com.ibm.jtopenlite.command.program.ProgramAdapter
All Implemented Interfaces:
Program
Direct Known Subclasses:
CloseList, GetListEntries, OpenListOfJobs, OpenListOfMessages, OpenListOfObjects, OpenListOfSpooledFiles, RetrieveAuthorizedUsers, RetrieveCurrentAttributes, RetrieveObjectDescription, RetrieveSystemStatus

public abstract class ProgramAdapter
extends Object
implements Program

Base class for all program call classes in this package.


Constructor Summary
protected ProgramAdapter(String library, String name, int numberOfParameters)
           
 
Method Summary
 int getNumberOfParameters()
          Returns the number of parameters for this program.
 byte[] getParameterInputData(int parmIndex)
          Returns the input data of the parameter at the specified index.
 int getParameterInputLength(int parmIndex)
          Returns the input length of the parameter at the specified index.
 int getParameterOutputLength(int parmIndex)
          Returns the output length of the parameter at the specified index.
 int getParameterType(int parmIndex)
          Returns the type of parameter at the specified index.
 String getProgramLibrary()
          Returns the library of the program object.
 String getProgramName()
          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.
 void newCall()
          Invoked before any other methods on this interface by CommandConnection whenever this Program is called.
 void setParameterOutputData(int parmIndex, byte[] tempData, int maxLength)
          Sets the output data for the parameter at the specified index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgramAdapter

protected ProgramAdapter(String library,
                         String name,
                         int numberOfParameters)
Method Detail

newCall

public final void newCall()
Description copied from interface: Program
Invoked before any other methods on this interface by CommandConnection whenever this Program is called.

Specified by:
newCall in interface Program

getProgramLibrary

public final String getProgramLibrary()
Description copied from interface: Program
Returns the library of the program object.

Specified by:
getProgramLibrary in interface Program

getProgramName

public final String getProgramName()
Description copied from interface: Program
Returns the name of the program object.

Specified by:
getProgramName in interface Program

getNumberOfParameters

public final int getNumberOfParameters()
Description copied from interface: Program
Returns the number of parameters for this program.

Specified by:
getNumberOfParameters in interface Program

getParameterType

public final int getParameterType(int parmIndex)
Description copied from interface: Program
Returns the type of parameter at the specified index.

Specified by:
getParameterType in interface Program
See Also:
Parameter

getParameterInputLength

public final int getParameterInputLength(int parmIndex)
Description copied from interface: Program
Returns the input length of the parameter at the specified index.

Specified by:
getParameterInputLength in interface Program

getParameterOutputLength

public final int getParameterOutputLength(int parmIndex)
Description copied from interface: Program
Returns the output length of the parameter at the specified index.

Specified by:
getParameterOutputLength in interface Program

getParameterInputData

public final byte[] getParameterInputData(int parmIndex)
Description copied from interface: Program
Returns the input data of the parameter at the specified index.

Specified by:
getParameterInputData in interface Program

setParameterOutputData

public final void setParameterOutputData(int parmIndex,
                                         byte[] tempData,
                                         int maxLength)
Description copied from interface: Program
Sets the output data for the parameter at the specified index.

Specified by:
setParameterOutputData in interface Program

getTempDataBuffer

public final byte[] getTempDataBuffer()
Description copied from interface: Program
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. 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:
getTempDataBuffer in interface Program