public class ProgramParameter
extends java.lang.Object
implements java.io.Serializable
ProgramCall
and ServiceProgramCall
to pass parameter data, either to a program, from a program, or both. Input data is passed to a program as a byte array with setInputData()
. Output data is requested from a program by specifying the amount of data to return with setOutputDataLength()
. To get the output data once the program has run, use getOutputData()
. These values may also be set on the constructor.Modifier and Type | Field and Description |
---|---|
static int |
PASS_BY_REFERENCE
Constant indicating parameter data is passed by reference.
|
static int |
PASS_BY_VALUE
Constant indicating parameter data is passed by value.
|
Constructor and Description |
---|
ProgramParameter()
Constructs a ProgramParameter object.
|
ProgramParameter(byte[] inputData)
Constructs a ProgramParameter object.
|
ProgramParameter(byte[] inputData,
int outputDataLength)
Constructs ProgramParameter object.
|
ProgramParameter(int outputDataLength)
Constructs a ProgramParameter object.
|
ProgramParameter(int parameterType,
byte[] inputData)
Constructs a ProgramParameter object.
|
ProgramParameter(int parameterType,
byte[] inputData,
int outputDataLength)
Constructs ProgramParameter object.
|
ProgramParameter(int parameterType,
int outputDataLength)
Constructs a ProgramParameter object.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener.
|
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds a VetoableChangeListener.
|
byte[] |
getInputData()
Returns the parameter data that will be sent to the program.
|
byte[] |
getOutputData()
Returns the parameter data that has been received from the program.
|
int |
getOutputDataLength()
Returns the output parameter data length.
|
int |
getParameterType()
Returns the program parameter type.
|
boolean |
isNullParameter()
Indicates if this object represents a null parameter.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes this PropertyChangeListener.
|
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes this VetoableChangeListener.
|
void |
setInputData(byte[] inputData)
Sets the parameter data that will be sent to the program.
|
void |
setNullParameter(boolean nullParameter)
Sets the parameter to null.
|
void |
setOutputDataLength(int outputDataLength)
Sets the output parameter data length.
|
void |
setParameterType(int parameterType)
Sets the type of program parameter.
|
public static final int PASS_BY_VALUE
public static final int PASS_BY_REFERENCE
public ProgramParameter()
public ProgramParameter(byte[] inputData)
inputData
- The parameter data to be used as input to the program.public ProgramParameter(int outputDataLength)
outputDataLength
- The amount of data to be returned from the program (number of bytes).public ProgramParameter(byte[] inputData, int outputDataLength)
inputData
- Parameter data passed to the program.outputDataLength
- The amount of data to be returned from the program (number of bytes).public ProgramParameter(int parameterType, byte[] inputData)
parameterType
- The type of parameter.
Valid values are PASS_BY_VALUE
and PASS_BY_REFERENCE
. The default is PASS_BY_VALUE.inputData
- The parameter data to be used as input to the program.public ProgramParameter(int parameterType, int outputDataLength)
parameterType
- The type of parameter.
Valid values are PASS_BY_VALUE
and PASS_BY_REFERENCE
. The default is PASS_BY_VALUE.outputDataLength
- The amount of data to be returned from the program (number of bytes).public ProgramParameter(int parameterType, byte[] inputData, int outputDataLength)
parameterType
- The type of parameter.
Valid values are PASS_BY_VALUE
and PASS_BY_REFERENCE
. The default is PASS_BY_VALUE.inputData
- The parameter data to be used as input to the program.outputDataLength
- The amount of data to be returned from the program (number of bytes).public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener.public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The VetoableChangeListener.public byte[] getInputData()
public byte[] getOutputData()
public int getOutputDataLength()
public int getParameterType()
PASS_BY_VALUE
- The parameter is passed as data.
PASS_BY_REFERENCE
- The parameter is passed as a reference.
public boolean isNullParameter()
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener.public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The VetoableChangeListener.public void setInputData(byte[] inputData) throws java.beans.PropertyVetoException
inputData
- The parameter data to be used as input to the program.java.beans.PropertyVetoException
- If the change is vetoed.public void setNullParameter(boolean nullParameter)
nullParameter
- The parameter data to be used as input to the program.public void setOutputDataLength(int outputDataLength) throws java.beans.PropertyVetoException
outputDataLength
- The amount of data to be returned from the program (number of bytes).java.beans.PropertyVetoException
- If the change is vetoed.public void setParameterType(int parameterType) throws java.beans.PropertyVetoException
parameterType
- 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.
java.beans.PropertyVetoException
- If the change is vetoed.