org.maverickdbms.basic
Class Session

java.lang.Object
  extended byorg.maverickdbms.basic.Session

public class Session
extends java.lang.Object

The Session class is designed to be a continer to hold session specific data for the user.


Field Summary
static long DATE_OFFSET
           
static long MILLISECS_IN_A_DAY
           
static int SCREEN_CHANNEL
           
static int SYSTEM_BUFFER
           
static int SYSTEM_CRTHIGH
           
static int SYSTEM_CRTLINES
           
static int SYSTEM_CRTWIDE
           
static int SYSTEM_LEVEL
           
static int SYSTEM_PRINTER
           
static int SYSTEM_PRINTERLINES
           
static int SYSTEM_PRINTERPAGE
           
static int SYSTEM_PROGRAMTIME
           
static int SYSTEM_SELECTLIST
           
static int SYSTEM_SLEEP
           
static int SYSTEM_SOMETHING
           
static int SYSTEM_STATUS
           
static int SYSTEM_STON
           
static int SYSTEM_TAPEBLOCKSIZE
           
static int SYSTEM_TERM
           
static int SYSTEM_TIME
           
 
Constructor Summary
Session()
           
Session(java.util.Properties properties, PseudoTerminal pty)
           
 
Method Summary
 void BREAK(boolean enable)
          Set break key handling Note this function is not yet implemented
 void CALL(ConstantString subr, mvString[] params)
          Executes the specified subroutine
static java.lang.String convertName(java.lang.String name)
          converts a filename from external format to internal format
static mvString DATE(mvString result)
          Returns a number containing the internal date.
 void EXECUTE(mvString result, ConstantString command)
          Executes the specified command
 void EXECUTE(mvString result, Program program, ConstantString name, mvString[] args)
           
 mvString getAtVariable(mvString r, int n)
           
 Program getBaseProgram()
          Gets the original starting program in the session
 PrintChannel getChannel(int channelNumber)
           
 java.lang.String getCommandString()
           
 Common getCommon(java.lang.String name)
          Get specified named common for session
 Common getDefaultCommon()
           
 Terminal getEmulation()
           
 Factory getFactory()
           
 InputChannel getInputChannel()
           
 Program getProgram()
           
 ConstantString getPrompt()
           
 java.util.Properties getProperties()
           
 boolean getProperty(java.lang.String property, boolean dflt)
           
 int getProperty(java.lang.String property, int dflt)
           
 java.lang.String getProperty(java.lang.String property, java.lang.String dflt)
           
 mvString getStatus()
           
 mvString getSystem(mvString result, int sequenceNo)
          Retrieves specified SYSTEM value.
 void handleError(java.lang.Exception e, mvString status)
           
static void NAP(ConstantString millis)
           
 void PCPERFORM(mvString result, ConstantString command)
           
 void PRINTER_CLOSE(ConstantString channel, mvString status)
           
 void PRINTER_CLOSE(mvString status)
           
 void PRINTER(boolean printerEnabled)
           
 void PROMPT(ConstantString val)
           
 void registerFileClose(Program program, File file)
           
 void registerFileOpen(Program program, File file)
           
static void RQM(ConstantString mvs)
           
 void setAtVariable(int index, ConstantString value)
           
 void setProperties(java.util.Properties properties)
           
 void setSystem(int sequenceNo, ConstantString value)
           
static void SLEEP(ConstantString mvs)
           
static mvString TIME(mvString result)
          Returns the current time in internal format(seconds since midnight).
static mvString TIMEDATE(mvString result)
          Returns a string representation of the current time and date
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE_OFFSET

public static final long DATE_OFFSET
See Also:
Constant Field Values

MILLISECS_IN_A_DAY

public static final long MILLISECS_IN_A_DAY
See Also:
Constant Field Values

SCREEN_CHANNEL

public static final int SCREEN_CHANNEL
See Also:
Constant Field Values

SYSTEM_STATUS

public static final int SYSTEM_STATUS
See Also:
Constant Field Values

SYSTEM_PRINTER

public static final int SYSTEM_PRINTER
See Also:
Constant Field Values

SYSTEM_CRTWIDE

public static final int SYSTEM_CRTWIDE
See Also:
Constant Field Values

SYSTEM_CRTHIGH

public static final int SYSTEM_CRTHIGH
See Also:
Constant Field Values

SYSTEM_CRTLINES

public static final int SYSTEM_CRTLINES
See Also:
Constant Field Values

SYSTEM_PRINTERPAGE

public static final int SYSTEM_PRINTERPAGE
See Also:
Constant Field Values

SYSTEM_PRINTERLINES

public static final int SYSTEM_PRINTERLINES
See Also:
Constant Field Values

SYSTEM_TERM

public static final int SYSTEM_TERM
See Also:
Constant Field Values

SYSTEM_TAPEBLOCKSIZE

public static final int SYSTEM_TAPEBLOCKSIZE
See Also:
Constant Field Values

SYSTEM_PROGRAMTIME

public static final int SYSTEM_PROGRAMTIME
See Also:
Constant Field Values

SYSTEM_STON

public static final int SYSTEM_STON
See Also:
Constant Field Values

SYSTEM_SELECTLIST

public static final int SYSTEM_SELECTLIST
See Also:
Constant Field Values

SYSTEM_TIME

public static final int SYSTEM_TIME
See Also:
Constant Field Values

SYSTEM_SLEEP

public static final int SYSTEM_SLEEP
See Also:
Constant Field Values

SYSTEM_BUFFER

public static final int SYSTEM_BUFFER
See Also:
Constant Field Values

SYSTEM_SOMETHING

public static final int SYSTEM_SOMETHING
See Also:
Constant Field Values

SYSTEM_LEVEL

public static final int SYSTEM_LEVEL
See Also:
Constant Field Values
Constructor Detail

Session

public Session()

Session

public Session(java.util.Properties properties,
               PseudoTerminal pty)
        throws mvException
Method Detail

BREAK

public void BREAK(boolean enable)
           throws mvException
Set break key handling Note this function is not yet implemented

Parameters:
enable - whether to enable break key handling
Throws:
mvException

CALL

public void CALL(ConstantString subr,
                 mvString[] params)
          throws mvException
Executes the specified subroutine

Parameters:
subr - subroutine name
params - subroutine parameters
Throws:
mvException

convertName

public static java.lang.String convertName(java.lang.String name)
converts a filename from external format to internal format


DATE

public static mvString DATE(mvString result)
Returns a number containing the internal date. The internal date is the number of days since December 31 1967

Returns:
the days since December 31 1967

EXECUTE

public void EXECUTE(mvString result,
                    ConstantString command)
Executes the specified command

Parameters:
result - the string to contain the programs screen output
command - the command to execute

EXECUTE

public void EXECUTE(mvString result,
                    Program program,
                    ConstantString name,
                    mvString[] args)

getAtVariable

public mvString getAtVariable(mvString r,
                              int n)
                       throws mvException
Throws:
mvException

getBaseProgram

public Program getBaseProgram()
Gets the original starting program in the session


getDefaultCommon

public Common getDefaultCommon()

getCommandString

public java.lang.String getCommandString()

getCommon

public Common getCommon(java.lang.String name)
Get specified named common for session

Parameters:
name - name of common required

getEmulation

public Terminal getEmulation()
                      throws mvException
Throws:
mvException

getFactory

public Factory getFactory()

getInputChannel

public InputChannel getInputChannel()
                             throws mvException
Throws:
mvException

getChannel

public PrintChannel getChannel(int channelNumber)
                        throws mvException
Throws:
mvException

getProgram

public Program getProgram()

getPrompt

public ConstantString getPrompt()

getProperty

public boolean getProperty(java.lang.String property,
                           boolean dflt)

getProperty

public int getProperty(java.lang.String property,
                       int dflt)

getProperty

public java.lang.String getProperty(java.lang.String property,
                                    java.lang.String dflt)

getProperties

public java.util.Properties getProperties()

getStatus

public mvString getStatus()

handleError

public void handleError(java.lang.Exception e,
                        mvString status)

NAP

public static void NAP(ConstantString millis)

PCPERFORM

public void PCPERFORM(mvString result,
                      ConstantString command)
               throws mvException
Throws:
mvException

PRINTER

public void PRINTER(boolean printerEnabled)

PRINTER_CLOSE

public void PRINTER_CLOSE(mvString status)
                   throws mvException
Throws:
mvException

PRINTER_CLOSE

public void PRINTER_CLOSE(ConstantString channel,
                          mvString status)
                   throws mvException
Throws:
mvException

PROMPT

public void PROMPT(ConstantString val)

registerFileClose

public void registerFileClose(Program program,
                              File file)

registerFileOpen

public void registerFileOpen(Program program,
                             File file)

RQM

public static void RQM(ConstantString mvs)
                throws java.text.ParseException,
                       java.lang.InterruptedException
Throws:
java.text.ParseException
java.lang.InterruptedException

setAtVariable

public void setAtVariable(int index,
                          ConstantString value)
                   throws mvException
Throws:
mvException

setProperties

public void setProperties(java.util.Properties properties)

setSystem

public void setSystem(int sequenceNo,
                      ConstantString value)
               throws mvException
Throws:
mvException

SLEEP

public static void SLEEP(ConstantString mvs)

getSystem

public mvString getSystem(mvString result,
                          int sequenceNo)
                   throws mvException
Retrieves specified SYSTEM value.

Parameters:
result - variable to hold result
sequenceNo - index required
Throws:
mvException

TIME

public static mvString TIME(mvString result)
Returns the current time in internal format(seconds since midnight).

Returns:
the time

TIMEDATE

public static mvString TIMEDATE(mvString result)
Returns a string representation of the current time and date

Returns:
mvString containing the time and date