Serializable
ErrorCodeParameter
public class ProgramParameter extends Object implements 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 | 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 | 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 | Description |
---|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener) |
Adds a PropertyChangeListener.
|
void |
addVetoableChangeListener(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(PropertyChangeListener listener) |
Removes this PropertyChangeListener.
|
void |
removeVetoableChangeListener(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(PropertyChangeListener listener)
listener
- The PropertyChangeListener.public void addVetoableChangeListener(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(PropertyChangeListener listener)
listener
- The PropertyChangeListener.public void removeVetoableChangeListener(VetoableChangeListener listener)
listener
- The VetoableChangeListener.public void setInputData(byte[] inputData) throws PropertyVetoException
inputData
- The parameter data to be used as input to the program.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 PropertyVetoException
outputDataLength
- The amount of data to be returned from the program (number of bytes).PropertyVetoException
- If the change is vetoed.public void setParameterType(int parameterType) throws 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.
PropertyVetoException
- If the change is vetoed.Copyright © 2024. All rights reserved.