All Packages  This Package  Class Hierarchy  Class Search  Index

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

  Summary

public class  Gateway50
     extends java.lang.Object
     implements bmsi.sna.SNA3770, 
                bmsi.sna.JBMStatus.StateListener
{
          // Constructors 1
     public Gateway50(String, int, boolean) throws IOException;

          // Methods 8
     public void addDevice(SNADevice);
     public boolean cancel(String);
     public void command(String) throws IOException;
     public void dispose() throws IOException;
     public void logon(String) throws IOException;
     public void luState(int, byte, byte);
     public String status(String) throws IOException;
     public void submit(Reader, int) throws IOException;
}

Manage SNA communications through a Gateway 50 from JBM Electronics. There are 4 major configuration areas for the Gateway firmware that affect this software.

  1. RS232 port configuration.
  2. PU and LU configurations for the rs232 port.
  3. TCP port configurations.
  4. Routing table to connect LUs to TCP ports.
This class connects to TCP ports on the Gateway that are routed to SNA LUs.

The rs232 port configuration on the Gateway should be as follows:

Port Mode: DTE

Duplex: FDX

Line Type: DIAL

Line Encoding: NRZ

Line Speed:

Not used when the modem supplies the clock.

Maxcount: 7

Segment Size: 512

Compression: No

This option is only used when "Strip Format Commands: YES" is set for an LU.

Delivery Confirmation: Disable

If this is enabled with JBM extended headers, each block has "Request Confirmation" set. The TCP side must repond with a block with "Positive acknowlegement" set before any more blocks are accepted. Note that this seems to be the opposite of what the SETUP online help says, but is based on actual observation.

Remote Status: Sent

Tells the SNA host when the TCP side connects or disconnects.

Disconnect Action: Unbind

What to tell the SNA host when the TCP side disconnects.

Split Records: No

Tries to avoid splitting a message between frames by examining the last block for an RS character.

Convert RS to CR: No

Effective with "String Format Commands"

Character Conversion: No

Interface: RS232

Independent DTR/DSR: No

Setting this to "No" controls DTR/DSR based on whether any LUs are connected to the TCP side. This lets us cause dial on DTR modems to dial when we connect to the Gateway.

Attachable Protocol: None

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




  Constructors

· Gateway50

Summary  |  Top

   public Gateway50(String host, 
                    int lucnt, 
                    boolean reset)  throws IOException

Create a Gateway 50 SNA session manager. SNA LUs must be routed to consecutive TCP ports. For Gateway firmware version 112, all configured ports must be used, or DTR will go up when any TCP port is connected to, and stay up until the Gateway is reset. If all ports are used, DTR will drop again when all TCP ports are disconnected. The hostname may optionally contain a username and password and a port number similar to an ftp URL. For example, the host "fred:pebbles@rocky:4001" specifies a login of "fred", a password of "pebbles", a hostname of "rocky", and a port of 4001. The default port is 5001. The default login is "gateway" with a passwd of "gateway".

Parameter Description
host the hostname or IP address of the Gateway 50
lucnt the number of LUs to use for this session
reset true for an initial reset of the Gateway



  Methods

· addDevice

Summary  |  Top
   public void addDevice(SNADevice dev) 

Add an output device. Host output is distributed to an SNADevice based on the medium selected by the host and the result of calling getMedium() on each SNADevice.

Parameter Description
dev the output device to add to the configuration

Implements:
addDevice in interface SNA3770


· luState

Summary  |  Top
   public void luState(int i, 
                       byte old, 
                       byte state) 
Implements:
luState in interface JBMStatus.StateListener


· logon

Summary  |  Top
   public void logon(String s)  throws IOException

Send logon card to all LUs.

Implements:
logon in interface SNA3770


· dispose

Summary  |  Top
   public void dispose()  throws IOException
Implements:
dispose in interface SNA3770


· status

Summary  |  Top
   public String status(String cmd)  throws IOException

Execute a telnet command on the Gateway and print the response. A useful command is "show stat rs232".



· command

Summary  |  Top
   public void command(String cmd)  throws IOException

Send a console command to this host.

Implements:
command in interface SNA3770


· submit

Summary  |  Top
   public void submit(Reader rdr, 
                      int medium)  throws IOException

Send a file to the host. This method will block until an LU is available, then send the entire file and wait for confirmation of the last block before returning.

Parameter Description
rdr the file to send
medium the source medium

Implements:
submit in interface SNA3770


· cancel

Summary  |  Top
   public boolean cancel(String jobid) 

Cancel a job queued for this host. Return true if the cancel succeeded, false otherwise.



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