public class StartRequest extends RemotableResource
This Bean provides the Java equivalent to the EXEC CICS START command.
In addition to the properties it inherits from RemotableResource, it defines the following properties:
Calendar
object which defines the time at which the task
should be started.
com.ibm.cics.server.API
for general restrictions on using the JCICS API.
,
Serialized FormConstructor and Description |
---|
StartRequest()
Construct a StartRequest bean.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel a previous start request.
|
byte[] |
getID()
Return the ID that uniquely identifies the start request.
|
java.lang.String |
getIDAsString()
Return the ID that uniquely identifies the start request as a string,
using the LOCALCCSID character encoding to convert from the
byte[] format in which the name is stored.
|
byte[] |
getQueueName()
Return the queueName of the start request.
|
java.lang.String |
getQueueNameAsString()
Return the queue name of the start request as a string,
using the LOCALCCSID
character encoding to convert from the internal byte[] format
in which the name is stored.
|
java.lang.String |
getRTerminal()
Get the name specified as the terminal name to be retrieved by
the started task.
|
java.lang.String |
getRTransaction()
Get the name specified as the transaction name to be retrieved by
the started task.
|
java.lang.String |
getTerminal()
Return the name of the terminal to be used as the principal facility of
the started task.
|
java.util.Calendar |
getTime()
Return the time at which the task will be started.
|
java.lang.String |
getTransId()
Return the name of the Transaction to be started.
|
java.lang.String |
getUserId()
Return the user ID under whose authority the task is to run.
|
boolean |
isChecked()
Is this start request to be checked?
|
boolean |
isProtected()
Is this start request to be protected?
|
void |
issue()
Issue the start request passing no data to the started task.
|
void |
issue(byte[] data)
Issue the start request, passing a byte array to the started task.
|
void |
issue(Channel chan)
Issue the start request, passing a Channel to the started task.
|
void |
resetRequestData()
Reset the required fields on the
StartRequest to allow
reuse of the object. |
void |
setChecked(boolean checked)
Control whether start request is checked or not.
|
void |
setID(byte[] id)
Set the ID that uniquely identifies the start request.
|
void |
setIDFromString(java.lang.String id)
Set the ID that uniquely identifies the start request from a String.
|
void |
setProtected(boolean isProtected)
Control whether start request is protected or not.
|
void |
setQueueName(byte[] queueName)
Sets the queueName of the start request.
|
void |
setQueueNameFromString(java.lang.String name)
Sets the queue name of the start request.
|
void |
setRTerminal(java.lang.String rTerminal)
Set the terminal name to be retrieved by the started task.
|
void |
setRTransaction(java.lang.String rTransaction)
Set the transaction name to be retrieved by the started task.
|
void |
setTerminal(java.lang.String terminal)
Set the name of the terminal to be used as the principal facility of
the started task.
|
void |
setTime(java.util.Calendar calendar)
Set the time at which the task will be started.
|
void |
setTransId(java.lang.String transId)
Set the name of the Transaction to be started.
|
void |
setUserId(java.lang.String userId)
Set the user ID under whose authority the task will run.
|
getSysId, setSysId
getDescription, getName, setDescription, setName
public StartRequest()
public void cancel() throws InvalidRequestException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, InvalidSystemIdException
Cancel a previous start request.
If the ID property has not been set manually or by a call to
issue()
or issue(byte[])
, an InvalidRequestException
will be thrown.
InvalidRequestException
- INVREQ occurred or the
ID field has not been set.ISCInvalidRequestException
- ISCINVREQ occurred.NotAuthorisedException
- NOTAUTH occurred.RecordNotFoundException
- NOTFND occurred.InvalidSystemIdException
- SYSIDERR occurred.public void setTransId(java.lang.String transId)
transId
- Transaction to be startedpublic byte[] getID()
public java.lang.String getIDAsString()
public byte[] getQueueName()
public java.lang.String getQueueNameAsString()
public java.lang.String getRTerminal()
public java.lang.String getRTransaction()
public java.lang.String getTerminal()
public java.util.Calendar getTime()
public java.lang.String getUserId()
public java.lang.String getTransId()
public boolean isChecked()
public boolean isProtected()
public void issue() throws InvalidRequestException, ISCInvalidRequestException, IOErrorException, LengthErrorException, NotAuthorisedException, InvalidSystemIdException, TerminalException, InvalidTransactionIdException
InvalidRequestException
- INVREQ occurred.ISCInvalidRequestException
- ISCINVREQ occurred.IOErrorException
- IOERR occurred.LengthErrorException
- LENGERR occurred.NotAuthorisedException
- NOTAUTH occurred.InvalidSystemIdException
- SYSIDERR occurred.TerminalException
- TERMERR occurred.InvalidTransactionIdException
- TRANSIDERR occurred.public void issue(byte[] data) throws InvalidRequestException, ISCInvalidRequestException, IOErrorException, LengthErrorException, NotAuthorisedException, InvalidSystemIdException, TerminalException, InvalidTransactionIdException
data
- A byte[]
that is the
data to be passed to the started task.InvalidRequestException
- INVREQ occurred.ISCInvalidRequestException
- ISCINVREQ occurred.IOErrorException
- IOERR occurred.LengthErrorException
- LENGERR occurred.NotAuthorisedException
- NOTAUTH occurred.InvalidSystemIdException
- SYSIDERR occurred.TerminalException
- TERMERR occurred.InvalidTransactionIdException
- TRANSIDERR occurred.public void issue(Channel chan) throws InvalidRequestException, ISCInvalidRequestException, IOErrorException, LengthErrorException, NotAuthorisedException, InvalidSystemIdException, TerminalException, InvalidTransactionIdException, ChannelErrorException
Note that the following are invalid on start with channel and
should be reset to default using the resetRequestData()
method before calling this method.
Interval - setTime(Calender calender)
Reqid - setID(byte[] id)
Rtransid - setRTransaction(String rTransaction)
Rterminal - setRTerminal(String rTerminal)
Queue - setQueueName(byte[] queueName)
Nocheck - setChecked(boolean checked)
Protect - setProtected(boolean isProtected)
chan
- A Channel
that is the channel
to be passed to the started task.InvalidRequestException
- INVREQ occurred.ISCInvalidRequestException
- ISCINVREQ occurred.IOErrorException
- IOERR occurred.LengthErrorException
- LENGERR occurred.NotAuthorisedException
- NOTAUTH occurred.InvalidSystemIdException
- SYSIDERR occurred.TerminalException
- TERMERR occurred.InvalidTransactionIdException
- TRANSIDERR occurred.ChannelErrorException
- CHANNELERR occurred.public void setChecked(boolean checked)
checked
- true means request is checked; false means it is not.public void setID(byte[] id)
id
- The unique name. Its length should be <= 8.java.lang.NullPointerException
- start id is nullpublic void setIDFromString(java.lang.String id)
id
- The unique name. If the length of the String is less than
eight it is padded to 8 characters using space characters and it is
then converted to bytes using
the platform's default encoding. If the length of the resulting
byte array is more than eight then it is truncated to
exactly eight bytes.java.lang.NullPointerException
- start id is nullpublic void setProtected(boolean isProtected)
isProtected
- true means request is protected; false means it is not.public void setQueueName(byte[] queueName) throws java.lang.NullPointerException
queueName
- the queueName of the start request.
If the length of the queue name is less than eight it is padded with
the hex value of blank in the platform's default character encoding.
Over-length queueNames will be truncated.java.lang.NullPointerException
- queueName is nullpublic void setQueueNameFromString(java.lang.String name) throws java.lang.NullPointerException
name
- the queue name of the start request as a string.
If the length of the String is less than
eight it is padded to 8 characters using space characters and it is
then converted to bytes using
the platform's default encoding. If the length of the resulting
byte array is more than eight then it is truncated to
exactly eight bytes.java.lang.NullPointerException
- queueName is nullpublic void setRTerminal(java.lang.String rTerminal)
rTerminal
- the terminal name.public void setRTransaction(java.lang.String rTransaction)
rTransaction
- the transaction name.public void setTerminal(java.lang.String terminal)
terminal
- the name of the terminalpublic void setTime(java.util.Calendar calendar)
calendar
- A Calendar object for the time at which the task is
to be started.public void setUserId(java.lang.String userId)
userId
- the user ID under whose authority the task will run.public void resetRequestData()
StartRequest
to allow
reuse of the object. Should be called before calling issue(Channel)
if issue()
or issue(byte[])
have
already been called on this object.