All Packages  This Package  Class Hierarchy  Class Search  Index

Interface bmsi.edx.EDXServletRequest

  Summary

public interface  EDXServletRequest
{
          // Methods 12
     public abstract void calledx(int);
     public abstract String getBtasdir();
     public abstract Edxjava getEdxjava();
     public abstract InputStream getInputStream() throws IOException;
     public abstract OutputStream getOutputStream() throws IOException;
     public abstract byte[] getParm();
     public abstract EDX4978 getScreen();
     public abstract ActiveTCB getTCB();
     public abstract void setParm(byte[]);
     public abstract void setParmLen(int);
     public abstract int shell(String, byte[]) throws EDXShellException;
     public abstract int ushell(String, byte[]) throws EDXShellException;
}

This interface gives access to the EDX properties associated with the EDX program making a CALL JAVA request.

Author:
Stuart D. Gathman


  Cross Reference

Returned By:
Edxjava.getRequest()





  Methods

· getOutputStream

Summary  |  Top
   public abstract OutputStream getOutputStream()  throws IOException

Return an OutputStream connected to the EDX4978 or EDX4974 emulator for the EDX terminal attached to this Request. The first time this is called for a Request, the EDX4978 will clear the screen and enter "roll screen" mode. The EDX4978 will return to the EDX screen when this Request is disposed.



· getInputStream

Summary  |  Top
   public abstract InputStream getInputStream()  throws IOException

Return an InputStream connected to the EDX4978 or EDX4974 emulator for the EDX terminal attached to this Request. The first time this is called for a Request, the EDX4978 will clear the screen and enter "roll screen" mode. The EDX4978 will return to the EDX screen when this Request is disposed.



· getParm

Summary  |  Top
   public abstract byte[] getParm() 

Retrieve the parameter block passed by the EDX program. This is a simple array of bytes, and interpretation is application specific. The bmsi.xopen.FType class is helpful for converting EDX data to Java format. Hint: Java uses ISO names for 8-bit encodings - the ISO name for EBCDIC is Cp037. Use the Cp037 encoding to convert EBCDIC chars to unicode using either FType methods or String contructors.

See Also: FType



· setParm

Summary  |  Top
   public abstract void setParm(byte[] b) 

Return parameter data to the EDX caller. The return data overwrites the block passed as input to the call for as many bytes as are provided - but only up to the original size of the block. Return data beyond the block size specified by the EDX caller is discarded. The modified parameter block that results can be inspected by calling getParm again.



· setParmLen

Summary  |  Top
   public abstract void setParmLen(int b) 

Set the number of parameter bytes return to the EDX caller. Return data beyond the block size specified by the EDX caller is discarded.



· getTCB

Summary  |  Top
   public abstract ActiveTCB getTCB() 

Return the EDX Task of the caller. The ActiveTCB object make available additonal information such as the PROG and CCB.



· getBtasdir

Summary  |  Top
   public abstract String getBtasdir() 

Return the default BTAS directory for the calling EDX program. The default BTAS directory is passed as $PARM1 to BMS overlays.

Returns:
null if it is not available for some reason


· getScreen

Summary  |  Top
   public abstract EDX4978 getScreen() 

Return static screen access for the callilng EDX program. The current implementation can support either static screen or roll screen (getOutputStream()), but not both. The EDX task must have the 4978 terminal ENQTed.

Returns:
null if not available or not ENQTed


· calledx

Summary  |  Top
   public abstract void calledx(int op) 

Call back to EDL. Suspends this EDXServletRequest and transfers control back to EDL. The EDL code returns to Java by an unconditional transfer to RETJAVA. Recursive calls back again to a new Java EDXServlet are not supported at present.

Parameter Description
op A code which is put into $TCBCO2 to select what to do in the EDL code.



· shell

Summary  |  Top
   public abstract int shell(String prog, 
                             byte[] b)  throws EDXShellException

Call a BMS overlay using the SHELL system. The current program is suspended and swapped out to disk. Another overlay is run, and the current program is swapped back in and resumed when it terminates.

Parameter Description
prog the NAME,VOL of the EDX program overlay to call
b the parameter bytes passed to and returned from the overlay

Returns:
the number of bytes returned from the called overlay
Throws: XParmException
on XPARM overflow
Throws: EDXShellException
on SHELL stack overflow, or other EDX tasks active in the EDX overlay program
Throws: EDXError
on IPC failure talking to the EDX VM

See Also: parmPut, parmGet



· ushell

Summary  |  Top
   public abstract int ushell(String cmd, 
                              byte[] b)  throws EDXShellException

Run a command from the user's EDX4978 interface. The command is run attached to the users terminal and with the users privileges. The calling EDXServletRequest Thread blocks until the command finishes. Yes, the programs run using edx4978 had better be trusted. Eventually, edx4978 should be configured with allowed commands - like sudo.

Unix commands can read binary EDX parameter bytes on file descriptor 4 and write a binary EDX result record to file descriptor 3.

Parameter Description
cmd the command to execute - interpreted by the shell
b EDX parameters to pass to the command

Returns:
the number of EDX parameter bytes returned by the called program


· getEdxjava

Summary  |  Top
   public abstract Edxjava getEdxjava() 

Return the Edxjava instance this request belongs to.



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7