Verastream Transaction Integrator 4.0

com.attachmate.transaction.runtime.common.taskbean
Class BaseTxBean

java.lang.Object
  extended by com.attachmate.transaction.runtime.common.taskbean.BaseTaskBean
      extended by com.attachmate.transaction.runtime.common.taskbean.BaseTxBean
All Implemented Interfaces:
ITask, java.io.Serializable

public abstract class BaseTxBean
extends BaseTaskBean

See Also:
Serialized Form

Field Summary
static java.lang.String MODE_INPUT
          Constant value to specify target of setBLOB(begin, end, bytes[], mode) as the Program Input Area, and switch Task bean mode to Input
static java.lang.String MODE_OUTPUT
          Constant value to specify target of setBLOB(begin, end, bytes[], mode) as the Program Output Area, and switch Task bean mode to Output
 
Fields inherited from interface com.attachmate.tasks.ITask
PRESERVE_ALWAYS, PRESERVE_NEVER, PRESERVE_ON_ERROR
 
Constructor Summary
BaseTxBean()
          Default no argument constructor
 
Method Summary
 void doExecute()
          Handles the specifics of executing a client operation on a remote server.
 byte[] getBLOB()
          Returns a copy of the entire content of the host-supplied transaction response bytes currently held in the Program Output Area
 byte[] getBLOB(int beginIndex)
          Returns a copy of a specified portion of the host-supplied transaction response bytes in the Program Output Area.
 byte[] getBLOB(int beginIndex, int endIndex)
          Returns a copy of a specified portion of the host-supplied transaction response bytes in the Program Output Area.
 int getCurrentContentLength()
          Return the number of bytes of transaction data currently contained in the current Program I/O Area (Input Area if bean is in INPUT mode, Output Area if bean is currently in OUTPUT mode).
 java.lang.String getTaskPassword()
          Returns the current value of the Password that will be sent to the host for execution of the transaction when the client operation is executed.
 java.lang.String getTaskRACFGroup()
          Returns the value of the RACF Group that will be sent to the host for execution of the transaction when the client operation is executed.
 java.lang.String getTaskUserID()
          Returns the value of the UserID that will be sent to the host for execution of the transaction when the client operation is executed.
 java.lang.String getTransactionCode()
          Returns the Program Name specified during client operation definition that is to be used to invoke the target transaction when the client operation is executed.
 void reset()
          Clear instance properties of this task bean, and reset the bean state to INPUT mode for reuse in execution of another client operation.
 void setBLOB(byte[] inputBytes)
          Populate a portion of the Program Input Area with host-ready binary data.
 void setBLOB(int beginIndex, byte[] inputBytes)
          Populate a portion of the Program Input Area with host-ready binary data.
 void setBLOB(int beginIndex, int endIndex, byte[] inputBytes)
          Populate a portion of the Program Input Area with host-ready binary data.
 void setBLOB(int beginIndex, int endIndex, byte[] hostBytes, java.lang.String taskMode)
          Populate a portion of the Program Input or Output Area with host-ready binary data.
 void setNumberDecimalFormat(java.util.Locale locale)
           
 void setTaskPassword(java.lang.String password)
          Defines the value of the Password that will be sent to the host for execution of the transaction when the client operation is executed.
 void setTaskRACFGroup(java.lang.String racfGroup)
           
 void setTaskUserID(java.lang.String userID)
          Defines the value of the UserID that will be sent to the host for execution of the transaction when the client operation is executed.
 
Methods inherited from class com.attachmate.transaction.runtime.common.taskbean.BaseTaskBean
addTaskListener, cancel, clearContext, copyContext, executeAsync, executeSync, getInstanceName, getJobName, getLocale, getPreserveContext, getResourceName, getStatus, getTimeout, getTransaction, getVersion, removeTaskListener, setInstanceName, setJobName, setLocale, setPreserveContext, setRemoteServer, setResourceName, setTimeout, transferContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_INPUT

public static final java.lang.String MODE_INPUT
Constant value to specify target of setBLOB(begin, end, bytes[], mode) as the Program Input Area, and switch Task bean mode to Input

See Also:
Constant Field Values

MODE_OUTPUT

public static final java.lang.String MODE_OUTPUT
Constant value to specify target of setBLOB(begin, end, bytes[], mode) as the Program Output Area, and switch Task bean mode to Output

See Also:
Constant Field Values
Constructor Detail

BaseTxBean

public BaseTxBean()
Default no argument constructor

Method Detail

getCurrentContentLength

public int getCurrentContentLength()
                            throws TaskException
Return the number of bytes of transaction data currently contained in the current Program I/O Area (Input Area if bean is in INPUT mode, Output Area if bean is currently in OUTPUT mode). For Program I/O Areas with an OCCURS DEPENDING ON (ODO) construct, an error condition results if this method is called when the object of the ODO is not populated with instance data that defines the size of the OCCURS table.

Returns:
a int representing the current length of the active Program I/O Area. For client operation Output data, the exact number of bytes returned from the host transaction response is reported, regardless of whether it is larger, equal to, or smaller than the expected client operation output.
Throws:
TaskException - if an error occurs evaluating the current content length

setTaskUserID

public void setTaskUserID(java.lang.String userID)
Defines the value of the UserID that will be sent to the host for execution of the transaction when the client operation is executed.

Parameters:
userID - The UserID value to be used during client operation execution.

getTaskUserID

public java.lang.String getTaskUserID()
Returns the value of the UserID that will be sent to the host for execution of the transaction when the client operation is executed.

Returns:
String value currently set for the UserID to be used during client operation execution. If this value has not been set, a String of 8 blanks is returned.

getTaskRACFGroup

public java.lang.String getTaskRACFGroup()
Returns the value of the RACF Group that will be sent to the host for execution of the transaction when the client operation is executed. Note: This property applies to the Transaction Integrator for IMS only - it does not apply to the Transaction Integrator for CICS.

Returns:
String value currently set for the RACF Group to be used during client operation execution. If this value has not been set, a String of 8 blanks is returned.

setTaskRACFGroup

public void setTaskRACFGroup(java.lang.String racfGroup)

setTaskPassword

public void setTaskPassword(java.lang.String password)
Defines the value of the Password that will be sent to the host for execution of the transaction when the client operation is executed.

Parameters:
password - The Password value to be used during client operation execution.

getTaskPassword

public java.lang.String getTaskPassword()
Returns the current value of the Password that will be sent to the host for execution of the transaction when the client operation is executed.

Returns:
String value currently set for the Password to be used during client operation execution. If this value has not been set, a String of 8 blanks is returned.

getTransactionCode

public java.lang.String getTransactionCode()
Returns the Program Name specified during client operation definition that is to be used to invoke the target transaction when the client operation is executed.

Returns:
String value of the Program Name configured to invoke the target transaction at the host.

setBLOB

public void setBLOB(byte[] inputBytes)
             throws TxRecordException
Populate a portion of the Program Input Area with host-ready binary data. All bytes supplied will be applied beginning at Program Input Area offset zero.

Parameters:
inputBytes - Array of host formatted input for all or part of the Program Input Area. Must not contain more bytes than the size configured for the Program Input Area.
Throws:
TxRecordException - if errors occur applying supplied bytes to the Program Input Area
See Also:
DataToolKit

setBLOB

public void setBLOB(int beginIndex,
                    byte[] inputBytes)
             throws TxRecordException
Populate a portion of the Program Input Area with host-ready binary data.

Parameters:
beginIndex - Beginning index into the Program Input Area where the first byte of the supplied inputBytes will be copied
inputBytes - Array of host formatted input for all or part of the Program Input Area. Must contain at least (endIndex - beginIndex + 1) input data bytes.
Throws:
java.lang.IllegalArgumentException - if input parameters are invalid for the current state of the Program Input Area
TxRecordException - if errors occur applying supplied bytes to the Program Input Area
See Also:
DataToolKit

setBLOB

public void setBLOB(int beginIndex,
                    int endIndex,
                    byte[] inputBytes)
             throws TxRecordException
Populate a portion of the Program Input Area with host-ready binary data.

Parameters:
beginIndex - Beginning index into the Program Input Area where the first byte of the supplied inputBytes will be copied
endIndex - Ending index into the Program Input Area to where the input bytes will be applied.
inputBytes - Array of host formatted input for all or part of the Program Input Area. Must contain at least (endIndex - beginIndex + 1) input data bytes.
Throws:
TxRecordException - if errors occur applying supplied bytes to the Program Input Area
java.lang.IllegalArgumentException - if input parameters are inconsistent with each other, or with the state of the Program Input Area
See Also:
DataToolKit

setBLOB

public void setBLOB(int beginIndex,
                    int endIndex,
                    byte[] hostBytes,
                    java.lang.String taskMode)
             throws TxRecordException
Populate a portion of the Program Input or Output Area with host-ready binary data. This form of the setBLOB() method is used to either:
  1. populate the Program Input Area when the task bean is in Output mode and switch the bean to Input mode.
  2. populate the Program Output Area of a task bean is in Input mode and switch the task bean to Output mode.

Parameters:
beginIndex - beginning index into the Program I/Ot Area to where the first byte of the input hostBytes will be copied
endIndex - ending index into the Program I/O Area to where the last specified byte from the input hostBytes will be applied.
hostBytes - array of host formatted bytes for all or part of the Program I/O Area. Must contain at least (endIndex - beginIndex + 1) input data bytes.
taskMode - the 2 valid values are:
  1. MODE_INPUT indicates to apply the supplied hostBytes to the Program Input Area, and switch the state of the client operation to Input mode (pre-client operation execution)
  2. MODE_OUTPUT indicates to apply the supplied hostBytes to the Program Output Area, and switch the state of the client operation to Output mode (post-client operation execution).
Throws:
TxRecordException - if errors occur applying the supplied bytes to the indicated Program I/O Area.
java.lang.IllegalArgumentException - if input parameters are inconsistent with each other, or with the specified Program I/O Area
See Also:
DataToolKit

getBLOB

public byte[] getBLOB()
               throws TxRecordException
Returns a copy of the entire content of the host-supplied transaction response bytes currently held in the Program Output Area

Returns:
a byte array containing the transaction execution response bytes of the host transaction in untranslated host format,
Throws:
com.attachmate.transaction.runtime.common.task.TxRecordException - if errors occur obtaining the requested bytes from the Program Output Area
TxRecordException
See Also:
DataToolKit

getBLOB

public byte[] getBLOB(int beginIndex)
               throws TxRecordException
Returns a copy of a specified portion of the host-supplied transaction response bytes in the Program Output Area. The bytes from the specified zero-based beginIndex to the end of the instance data in the Program Output Area are returned.

Parameters:
beginIndex - index into the Program Output Area from where the first byte of the return BLOB will be obtained
Returns:
a byte array containing the specified transaction response bytes in host format,
Throws:
TxRecordException - if errors occur obtaining the requested bytes from the Program Output Area
See Also:
DataToolKit

getBLOB

public byte[] getBLOB(int beginIndex,
                      int endIndex)
               throws TxRecordException
Returns a copy of a specified portion of the host-supplied transaction response bytes in the Program Output Area. The bytes from the specified zero-based beginIndex to the endIndex byte of the Program Output Area are returned.

Parameters:
beginIndex - beginning index into the Program Output Area from where the first byte of this BLOB will be copied
endIndex - ending index into the Program Output Area from where the output bytes will be copied.
Returns:
a byte array containing the specified transaction response bytes in host format,
Throws:
TxRecordException - if errors occur obtaining the requested bytes from the Program Output Area
See Also:
DataToolKit

reset

public void reset()
           throws TaskException
Clear instance properties of this task bean, and reset the bean state to INPUT mode for reuse in execution of another client operation.

Throws:
TaskException

doExecute

public void doExecute()
               throws TaskException,
                      HostResponseFormatException
Description copied from class: BaseTaskBean
Handles the specifics of executing a client operation on a remote server. Made abstract because the actions to execute a specific client operation is not known by this base bean and needs to be implemented by classes which extend this.

Throws:
TaskException
HostResponseFormatException - if client operation execution response from the Host contains content that cannot be successfully parsed using the copybook format specified as expected client operation output when the client operation was designed.

setNumberDecimalFormat

public void setNumberDecimalFormat(java.util.Locale locale)

Verastream Transaction Integrator 4.0