All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.ProgramParameter

java.lang.Object
   |
   +----com.ibm.as400.access.ProgramParameter

public class ProgramParameter
extends Object
implements Serializable
The ProgramParameter class is used with ProgramCall and ServiceProgramCall to pass parameter data to an AS/400 program, from an AS/400 program, or both. Input data is passed to an AS/400 program as a byte array with setInputData. Output data is requested from an AS/400 program by specifying the amount of data to return with setOutputDataLength. To get the output data once the AS/400 program has run use getOutputData. These values may also be set on the constructor.

See Also:
ProgramCall, ServiceProgramCall

Variable Index

 o PASS_BY_REFERENCE
Constant indicating parameter data is passed by reference.
 o PASS_BY_VALUE
Constant indicating parameter data is passed by value.

Constructor Index

 o ProgramParameter()
Constructs a ProgramParameter object.
 o ProgramParameter(byte[])
Constructs a ProgramParameter object.
 o ProgramParameter(byte[], int)
Constructs ProgramParameter object.
 o ProgramParameter(int)
Constructs a ProgramParameter object.
 o ProgramParameter(int, byte[])
Constructs a ProgramParameter object.
 o ProgramParameter(int, byte[], int)
Constructs ProgramParameter object.
 o ProgramParameter(int, int)
Constructs a ProgramParameter object.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a PropertyChangeListener.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a VetoableChangeListener.
 o getInputData()
Returns the parameter data that will be sent to the program.
 o getOutputData()
Returns the parameter data that has been received from the program.
 o getOutputDataLength()
Returns the output parameter data length.
 o getParameterType()
Returns the program parameter type.
 o removePropertyChangeListener(PropertyChangeListener)
Removes this PropertyChangeListener from the internal list.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes this VetoableChangeListener from the JellyBeans internal list.
 o setInputData(byte[])
Sets the parameter data that will be sent to the program.
 o setOutputDataLength(int)
Sets the output parameter data length.
 o setParameterType(int)
Sets the type of program parameter.

Variables

 o PASS_BY_VALUE
 public static final int PASS_BY_VALUE
Constant indicating parameter data is passed by value.

 o PASS_BY_REFERENCE
 public static final int PASS_BY_REFERENCE
Constant indicating parameter data is passed by reference.

Constructors

 o ProgramParameter
 public ProgramParameter()
Constructs a ProgramParameter object.

 o ProgramParameter
 public ProgramParameter(byte data[])
Constructs a ProgramParameter object. An input parameter is created since a byte array containing parameter data is passed on this constructor.

Parameters:
data - The parameter data to be used as input to the program.
 o ProgramParameter
 public ProgramParameter(int size)
Constructs a ProgramParameter object. An output parameter is created since the size of the output data is passed on this constructor.

Parameters:
size - The amount of data to be returned from the program.
 o ProgramParameter
 public ProgramParameter(byte data[],
                         int size)
Constructs ProgramParameter object. An input/output parameter is created since both data passed to the program and the amount of data returned from the program is passed on this constructor.

Parameters:
data - Parameter data passed to the program.
size - The amount of data to be returned from the program.
 o ProgramParameter
 public ProgramParameter(int type,
                         byte data[])
Constructs a ProgramParameter object. An input parameter is created since a byte array containing parameter data is passed on this constructor. The type indicates if the data is pass by reference or pass by value and is used only by ServiceProgramCall.

Parameters:
type - The type of parameter.
data - The parameter data to be used as input to the program.
 o ProgramParameter
 public ProgramParameter(int type,
                         int size)
Constructs a ProgramParameter object. An output parameter is created since the size of the output data is passed on this constructor. The type indicates if the data is pass by reference or pass by value and is used only by ServiceProgramCall.

Parameters:
type - The type of parameter.
size - The amount of data to be returned from the program.
 o ProgramParameter
 public ProgramParameter(int type,
                         byte data[],
                         int size)
Constructs ProgramParameter object. An input/output parameter is created since both data passed to the program and the amount of data returned from the program is passed on this constructor. The type indicates if the data is pass by reference or pass by value and is used only by ServiceProgramCall.

Parameters:
type - The type of parameter.
data - The parameter data to be used as input to the program.
size - The amount of data to be returned from the program.

Methods

 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener l)
Adds a PropertyChangeListener. The specified PropertyChangeListeners propertyChange method will be called each time the value of any bound property is changed. The PropertyListener object is added to a list of PropertyChangeListeners managed by this CommandCall; it can be removed with removePropertyChangeListener.

Parameters:
l - The PropertyChangeListener.
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
 public void addVetoableChangeListener(VetoableChangeListener l)
Adds a VetoableChangeListener. The specified VetoableChangeListeners vetoableChange method will be called each time the value of any constrained property is changed.

Parameters:
l - The VetoableChangeListener.
See Also:
removeVetoableChangeListener
 o getInputData
 public byte[] getInputData()
Returns the parameter data that will be sent to the program. Null is returned if the Java program does not set input data.

Returns:
The parameter data to be used as input to the program.
 o getOutputData
 public byte[] getOutputData()
Returns the parameter data that has been received from the program. Null is returned if this parameter is an input parameter. Null is also returned before the AS/400 program is called.

Returns:
The output data returned from the program.
 o getOutputDataLength
 public int getOutputDataLength()
Returns the output parameter data length.

Returns:
The amount of data to be returned from the program.
 o getParameterType
 public int getParameterType()
Returns the program parameter type. The type indicates if data is passed by reference or passed by value, and is used only by ServiceProgramCall.

Returns:
The program parameter type.
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener l)
Removes this PropertyChangeListener from the internal list. If the PropertyChangeListener is not on the list, nothing is done.

Parameters:
l - The PropertyChangeListener.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
 public void removeVetoableChangeListener(VetoableChangeListener l)
Removes this VetoableChangeListener from the JellyBeans internal list. If the VetoableChangeListener is not on the list, nothing is done.

Parameters:
l - The VetoableChangeListener.
See Also:
addVetoableChangeListener
 o setInputData
 public void setInputData(byte data[]) throws PropertyVetoException
Sets the parameter data that will be sent to the program.

Parameters:
data - The parameter data to be used as input to the program.
Throws: PropertyVetoException
If the change is vetoed.
 o setOutputDataLength
 public void setOutputDataLength(int size) throws PropertyVetoException
Sets the output parameter data length.

Parameters:
size - The amount of data to be returned from the program.
Throws: PropertyVetoException
If the change is vetoed.
 o setParameterType
 public void setParameterType(int type) throws PropertyVetoException
Sets the type of program parameter. The type indicates if the data is pass by reference or pass by value and is used only by ServiceProgramCall.

Parameters:
type - The type of the program parameter. The type must be one of the following:
  • PASS_BY_VALUE The parameter is passed as data.
  • PASS_BY_REFERENCE The parameter is passed as a reference.
Throws: PropertyVetoException
If the change is vetoed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index