asjava.uniobjects
Class UniSubroutine

java.lang.Object
  extended byasjava.uniobjects.UniBase
      extended byasjava.uniobjects.UniSubroutine

public class UniSubroutine
extends UniBase

UniSubroutine is the object type used to allow the user to run a cataloged BASIC subroutine on the server.

Since:
UNIOBJECTS 1.0
Version:
Version 1.0
Author:
David T. Meeks

Field Summary
 
Fields inherited from class asjava.uniobjects.UniBase
inPacket, outPacket, uniConnection, uniEncryptionType, uniParentSession, uniStatus
 
Method Summary
 void call()
          Executes the catalogued UniVerse subroutine identified during the UniSubroutine creation.
 java.lang.String getArg(int aArgNum)
          retrieves the the contents of the subroutine arguments after a successful call has been executed
 int getNumArgs()
          Returns the number of arguments set for this subroutine
 java.lang.String getRoutineName()
          Retrieves the routine name established during the object creation
 void resetArgs()
          resets the output argument array back to all empty values.
 void setArg(int aArgNum, java.lang.Object aArgVal)
          sets up the input argument array to be used for the catalogued subroutine call
 void setNumArgs(int aNumArgs)
          sets up the number of input arguments to be used for this catalogued subroutine call
 void setRoutineName(java.lang.Object aRoutineName)
          sets up the name of the subroutine to be called on the server.
 
Methods inherited from class asjava.uniobjects.UniBase
getEncryptionType, isCommandActive, setEncryptionType, status
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

call

public void call()
          throws UniSubroutineException
Executes the catalogued UniVerse subroutine identified during the UniSubroutine creation. Uses the arguments established with the setArg method.

Throws:
UniSubroutineException - if a server error occurs
Since:
UNIOBJECTS 1.0
See Also:
setArg(int, java.lang.Object)

getArg

public java.lang.String getArg(int aArgNum)
                        throws UniSubroutineException
retrieves the the contents of the subroutine arguments after a successful call has been executed

Parameters:
aArgNum - integer value of the argument to be retrieved. 0 based, first argument is 0.
Returns:
String value representing the subroutine argument requested
Throws:
UniSubroutineException - if an invalid argument value is passed in
Since:
UNIOBJECTS 1.0
See Also:
setArg(int, java.lang.Object)

getNumArgs

public int getNumArgs()
Returns the number of arguments set for this subroutine

Returns:
integer value representing the number of argument set up for this subrouting
Since:
UNIOBJECTS 1.0
See Also:
setNumArgs(int)

getRoutineName

public java.lang.String getRoutineName()
Retrieves the routine name established during the object creation

Returns:
String value representing the name of the server-side BASIC routine to execute
Since:
UNIOBJECTS 1.0
See Also:
setRoutineName(java.lang.Object)

resetArgs

public void resetArgs()
resets the output argument array back to all empty values.

Since:
UNIOBJECTS 1.0

setArg

public void setArg(int aArgNum,
                   java.lang.Object aArgVal)
            throws UniSubroutineException
sets up the input argument array to be used for the catalogued subroutine call

Parameters:
aArgNum - integer representing which argument value is to be set. 0 represents the first argument
aArgVal - String representing the value to set this argument to
Throws:
UniSubroutineException - is thrown if the argument number is invalid
Since:
UNIOBJECTS 1.0
See Also:
getArg(int)

setNumArgs

public void setNumArgs(int aNumArgs)
                throws UniSubroutineException
sets up the number of input arguments to be used for this catalogued subroutine call

Parameters:
aNumArgs - integer representing the number of arguments this subroutine uses
Throws:
UniSubroutineException - is thrown if the argument number if invalid
Since:
UNIOBJECTS 1.0
See Also:
getNumArgs()

setRoutineName

public void setRoutineName(java.lang.Object aRoutineName)
sets up the name of the subroutine to be called on the server.

Parameters:
aRoutineName - String representing the name of the catalogued BASIC subroutine to be called on the server
Since:
UNIOBJECTS 1.0
See Also:
getRoutineName()