All Packages  This Package  Class Hierarchy  Class Search  Index

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

  Summary

public class  NetSpooler
     extends java.lang.Object
{
          // Constructors 1
     public NetSpooler(SNA3770) throws IOException;

          // Methods 6
     public static void main(String[]) throws Exception;

     public boolean cancel(String) throws IOException;
     public void command(String) throws IOException;
     public void dispose() throws IOException;
     public void logon(String) throws IOException;
     public String submit(String) throws IOException;
}

Manage a job queue and output spooling using a Socket interface. Unlike FIFOSpooler, this should be 100% pure Java. In particular, I have tested it running on Win98 with the Microsoft JVM. Ideally, this should implement the SNA Gateway Access Server protocol or some other public specification, but I don't know where that is documented yet. So for now, we use a simple ascii protocol for submitting jobs. The Submit class will submit jobs using this protocol.

Setup

The spooler needs its own directory to run in. Create subdirectories with the names output and jobs. IBM host output magically appears in the output sub-directory of the directory this spooler runs in. Console output appears on standard output. The jobs sub-directory holds info about jobs which have been submitted, but not yet sent to the IBM host. Create a file call signon which has one line of text. This is the LOGON command for the RJE host.

Startup

Start the spooler from the command line. Be sure to prepend the NETSPOOL.JAR file to the path. The syntax for doing this will vary with the OS and JVM in use. For unix, it might look something like this:
$ jre -cp netspool.jar bmsi.sna.NetSpooler fred:pebbles@g50 5001 &
Additional options will be listed if no arguments are supplied. Console output goes to stdout, and logfile output goes to stderr. These can be redirected if desired. The modem should be set to autodial on DTR. It should start doing so when you load the spooler. The logfile output will indicate when the spooler is logging in. When the LU sessions are activated, it can start sending jobs. It is OK to submit jobs before then. They are held until a free LU with an active session is available.

Submitting Jobs

The submit class will add text files to the send queue of the spooler. The syntax for doing this will vary with OS and JVM. For unix, it might look somehting like this:
$ jre -ms1m -cp netspool.jar bmsi.sna.Submit myjobfile
Additional options are listed if no arguments are supplied. It is probably a good idea to make a script or alias for your shell so that you don't have to type the first part every time.

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

See Also: Submit




  Constructors

· NetSpooler

Summary  |  Top

   public NetSpooler(SNA3770 rje)  throws IOException


  Methods

· dispose

Summary  |  Top
   public void dispose()  throws IOException


· command

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


· submit

Summary  |  Top
   public String submit(String filename)  throws IOException


· logon

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


· cancel

Summary  |  Top
   public boolean cancel(String jobid)  throws IOException


· main

Summary  |  Top
   public static void main(String[] argv)  throws Exception


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