|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectasjava.uniobjects.UniBase
asjava.uniobjects.UniCommand
UniCommand
is used to control remote command execution. With it users
can run UniVerse commands or stored procedures on the server.
Field Summary |
---|
Fields inherited from class asjava.uniobjects.UniBase |
---|
inPacket, outPacket, uniConnection, uniEncryptionType, uniParentSession, uniStatus |
Method Summary | |
---|---|
void |
cancel()
cancels all outstanding output from the executing command. |
void |
exec()
executes the command that was set up using the setCommand method. |
int |
getAtSelected()
returns the value of the @SELECTED variable from the server when the command has successfully completed |
int |
getBlockSize()
returns the current block size, in bytes, that is in use for server communications. |
java.lang.String |
getCommand()
returns the current execution string that was set with the setCommand method. |
int |
getSystemReturnCode()
returns the current value of @SYSTEM.RETURN.CODE from the server |
void |
nextBlock()
returns the next block of data from the command response, if the command response size was greater than the block size established with setBlockSize
After each call to nextBlock , the response method can be
called to retrieve the new block of data, and the status
method can be called to determine the state of execution |
void |
reply(java.lang.String aReplyString)
replies to a command execution that it currently in the UniS_REPLY
state. |
java.lang.String |
response()
returns the output from the command exec and reply methods |
void |
setBlockSize(int aBlockSize)
Sets the current block size to the value passed in |
void |
setCommand(java.lang.String aCommand)
establishes the command string or stored procedure to be run on the server |
int |
status()
returns the current execution status |
Methods inherited from class asjava.uniobjects.UniBase |
---|
getEncryptionType, isCommandActive, setEncryptionType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void cancel() throws UniCommandException
status
is either
UVS_REPLY
or UVS_MORE
. Upon completion, the command
status will be set to UVS_COMPLETE
, allowing another command to be
executed
UniCommandException
- is thrown upon failure conditionsstatus()
,
exec()
public void exec() throws UniCommandException
setCommand
method. The
results of the execution can be obtained using the response
method. The
status
method can be used to get the current state of the
command.
UniCommandException
- is thrown with error conditionssetCommand(java.lang.String)
,
status()
,
response()
public int getAtSelected()
exec()
public int getBlockSize()
setBlockSize(int)
public java.lang.String getCommand()
setCommand
method.
setCommand(java.lang.String)
public int status()
status
in class UniBase
reply
method.
setBlockSize
. The response
method
will return a response block of BlockSize bytes each time it
is called until no more data remains, at which point, the
status will be changed to UniS_COMPLETESince:
- UNIOBJECTS 1.0
- See Also:
reply(java.lang.String)
,
setBlockSize(int)
,
getBlockSize()
,
nextBlock()
public int getSystemReturnCode()
public void nextBlock() throws UniCommandException
setBlockSize
After each call to nextBlock
, the response
method can be
called to retrieve the new block of data, and the status
method can be called to determine the state of execution
UniCommandException
- is thrown if an error occurssetBlockSize(int)
,
nextBlock()
,
response()
,
status()
public void reply(java.lang.String aReplyString) throws UniCommandException
UniS_REPLY
state. Often, a server side command may require user input. Use this method
to send the input requested.
aReplyString
- reply string to be sent to the server
UniCommandException
- is thrown if an error occursstatus()
public java.lang.String response()
exec
and reply
methods
exec
or reply
methodsexec()
,
reply(java.lang.String)
public void setBlockSize(int aBlockSize)
aBlockSize
- integer representing the new block size, in bytes. This is the
amount of data retrieved with each response
method.getBlockSize()
,
response()
public void setCommand(java.lang.String aCommand)
aCommand
- command string to be executed on the servergetCommand()
,
exec()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |