Router

Figure 6.3 The Spooler Component

The router provides a single point of contact for clients, receiving service requests and passing those requests to whichever spooler component is best suited to handle the request.

When jobs arrive at the spooler, the client specifies the name of the target printer, and specifies the job's data type. For example, when a locally-run Windows-based application sends a job to local printer port, the graphics engine marks the job journal. The same jobs targeted for remote print servers are always marked with the raw data type. The LPD service marks UNIX print jobs that contain the "l" control command with the RAW data type, and marks UNIX jobs containing the "f" control command with the TEXT data type. Services for Macintosh marks Macintosh print jobs either the raw or Pscript1 data types, depending on the output device. Knowing the data type becomes important when the job reaches the next component, the local print provider.

The router uses the target printer name to determine whether the job should be printed on a local port or should be passed to another print server. If the job should be printed to a local port, then the router gives control to the local print provider. If the job is going to another print server, then the router passes control of the job to the appropriate remote print provider.