All Packages  This Package  Class Hierarchy  Class Search  Index

Class bmsi.sna.JBMLU
java.lang.Object
   |
   +----bmsi.sna.JBMLU

  Summary

public class  JBMLU
     extends java.lang.Object
     implements bmsi.sna.JBMHeader
{
          // Constructors 1
     public JBMLU(String, int) throws IOException;

          // Methods 9
     public void close();
     public FMH_1 getFMH();
     public InputStream getInputStream();
     public synchronized OutputStream getOutputStream(byte);
     public boolean isBusy();
     protected void setAppVer(String);
     protected void setPDIR(PDIR);
     protected void setState(byte);
     protected void trace(String);
}

This class manages a single LU/Port on a Gateway 50 protocol converter. We use JBM extended headers to preserve block boundaries and pass through SNA device selection to the SNA LU.

For output streams, each call to write() results in an SNA block. For input streams, each call to read() returns an SNA block, and available() will return the size of the next block.

On the rs232 side of the Gateway configuration, each LU should be configured as follows:

Terminal Type: 3770 (LU1)

Strip Format Commands: No

This turns off compression processing in the Gateway. We don't lose any generality by letting the Gateway do SCB compression for us, but if we let the Gateway do the compression for us, then it won't send us the FMH-1 headers, which we need.

Headers: No

This applies to 3270 emulation only.

Independent Activation: No

This prevents the SNA side from accepting data until the TCP side is connected.

Data Direction: Bidirectional

We need to LOGON to all LUs. If the Gateway handled SSCP for us, it could set LUs to input only or output only - which would avoid long output from the host getting interrupted by a job or command sent on the same LU.

Transmit Init-self: No

DLU Name Index: 00

Mode Name Index: 00

Passthrough: No

Passthrough mode might be useful if documented. It would require us to implement much of the SNA protocol.

Pass FM Header Medium: Yes

This returns the FM header on the first (or only) block of every message from the host. This contains information such as selected medium, whether compression is used, and data format. For messages to the host, the first (or only) block of every message should contain a single byte with the medium selection.

On the Ethernet side, each port should be configured as follows:

Independent Activation: Yes

This lets us initiate things from the TCP side.

Headers: JBM Extended

This divides the data into blocks, allowing us to see message boundaries and get meta information such as FMH headers.

Author:
Stuart D. Gathman Copyright (C) 1999 Business Management Systems, Inc.




  Constructors

· JBMLU

Summary  |  Top

   public JBMLU(String host, 
                int port)  throws IOException

Create an LU connection to the Gateway 50.

Parameter Description
host the host name or address of the Gateway 50
port the TCP port routed to the LU in the Gateway configuration.



  Methods

· setAppVer

Summary  |  Top
   protected void setAppVer(String appver) 

Configure this LU for a particular app ver. The controlling class should get this from the "show app" telnet command.

Parameter Description
appver the application version as returned by "show app"

See Also: JBMStatus



· trace

Summary  |  Top
   protected void trace(String line) 

Write a line to the TRACE file for this LU.



· setState

Summary  |  Top
   protected void setState(byte st) 

Set the LU state. This is not supplied in the current JBM TCP stream protocol, so it must come from an external source - for example the "show rs232" telnet command.

  0	PU Inactive
  1	PU Active
  3	LU Active
  7	Session Active
  

Parameter Description
st the new LU state, one of 0,1,3,7

See Also: JBMStatus



· close

Summary  |  Top
   public void close() 

Close this LU connection. The action taken on the SNA side is determined by the Disconnect Action setting. I recommend "Unbind" as the SNA action.



· getOutputStream

Summary  |  Top
   public synchronized OutputStream getOutputStream(byte devtype) 

Return an OutputStream for sending data to the host. If a JBMInput is active for this LU, it will be suspended, and resumed when this output is finished. This will "split" the JBMInput - and the pieces then must be glued back together. We can a) flag the active JBMInput to ignore the next BLKLAST. b) return null, encouraging the caller to try another LU.

Parameter Description
devtype the medium and subaddress for the source of the data

Returns:
the OutputStream or null if unavailable


· isBusy

Summary  |  Top
   public boolean isBusy() 

Return true if this LU is currently receiving host data or does not have an active session.



· setPDIR

Summary  |  Top
   protected void setPDIR(PDIR pdir) 

Process a PDIR record from the host. Derived classes should override this to know when to start a new logical output file. The PDIR contains other useful info such as dataset jobname and timestamp.



· getFMH

Summary  |  Top
   public FMH_1 getFMH() 

Get the FMH header for the current input stream.

Returns:
the current FMH or null if unavailable


· getInputStream

Summary  |  Top
   public InputStream getInputStream() 


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