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
-
PASS_BY_REFERENCE
- Constant indicating parameter data is passed by reference.
-
PASS_BY_VALUE
- Constant indicating parameter data is passed by value.
-
ProgramParameter()
- Constructs a ProgramParameter object.
-
ProgramParameter(byte[])
- Constructs a ProgramParameter object.
-
ProgramParameter(byte[], int)
- Constructs ProgramParameter object.
-
ProgramParameter(int)
- Constructs a ProgramParameter object.
-
ProgramParameter(int, byte[])
- Constructs a ProgramParameter object.
-
ProgramParameter(int, byte[], int)
- Constructs ProgramParameter object.
-
ProgramParameter(int, int)
- Constructs a ProgramParameter object.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a PropertyChangeListener.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a VetoableChangeListener.
-
getInputData()
- Returns the parameter data that
will be sent to
the program.
-
getOutputData()
- Returns the parameter data that
has been received from
the program.
-
getOutputDataLength()
- Returns the output parameter data length.
-
getParameterType()
- Returns the program parameter type.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes this PropertyChangeListener from the internal list.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes this VetoableChangeListener from the JellyBeans internal list.
-
setInputData(byte[])
-
Sets the parameter data that
will be sent to
the program.
-
setOutputDataLength(int)
- Sets the output parameter data length.
-
setParameterType(int)
- Sets the type of program parameter.
PASS_BY_VALUE
public static final int PASS_BY_VALUE
- Constant indicating parameter data is passed by value.
PASS_BY_REFERENCE
public static final int PASS_BY_REFERENCE
- Constant indicating parameter data is passed by reference.
ProgramParameter
public ProgramParameter()
- Constructs a ProgramParameter object.
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.
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.
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.
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.
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.
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.
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
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
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.
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.
getOutputDataLength
public int getOutputDataLength()
- Returns the output parameter data length.
- Returns:
- The amount of data to be returned from the program.
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.
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
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
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.
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.
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