Package com.pixelmed.web

## Class RequestTypeServer

- java.lang.Object
- - com.pixelmed.web.HttpServer
  - - com.pixelmed.web.RequestTypeServer

- All Implemented Interfaces:
    `java.lang.Runnable`

      public class RequestTypeServer
      extends HttpServer

  The `RequestTypeServer` implements an HTTP server that responds to requests of a specified type and dispatches the further handling to a derived class corresponding to the request type.

  Requests are of the form "?requestType=XXXX" where XXXX is the request type.

  This includes responding to WADO GET requests as defined by DICOM PS 3.18 (ISO 17432), which provides a standard web (http) interface through which to retrieve DICOM objects either as DICOM files or as derived JPEG images.

  In addition to servicing WADO requests, it provides lists of patients, studies and series that link to WADO URLs.

  It extends extends `HttpServer` and implements `generateResponseToGetRequest()`.

  The main method is also useful in its own right as a command-line DICOM Storage SCP utility, which will store incoming files in a specified directory and database and server them up via WADO.

  For example:

      % java -server -Djava.awt.headless=true -Xms128m -Xmx512m -cp ./pixelmed.jar:./hsqldb.jar:./commons-compress-1.12.jar:./vecmath1.2-1.14.jar:./commons-codec-1.3.jar com.pixelmed.web.RequestTypeServer ./testwadodb ./testwadoimages 4007 WADOTEST 7091 "192.168.1.100" IMAGEDISPLAY

  See Also:
    `WadoServer`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `protected class` | `RequestTypeServer.RequestTypeWorker` |

    - ### Nested classes/interfaces inherited from class com.pixelmed.web.HttpServer

      `HttpServer.Worker`

  - ### Field Summary

    - ### Fields inherited from class com.pixelmed.web.HttpServer

      `defaultNumberOfWorkers`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `RequestTypeServer​(DatabaseInformationModel databaseInformationModel, int wadoPort, java.lang.String rootURL, java.lang.String stylesheetPath, java.lang.String requestTypeToUseForInstances)` |
    `RequestTypeServer​(DatabaseInformationModel databaseInformationModel, WebServerApplicationProperties webServerApplicationProperties)` |
    `RequestTypeServer​(java.lang.String dataBaseFileName, java.lang.String savedImagesFolderName, int dicomPort, java.lang.String calledAETitle, int wadoPort, java.lang.String rootURL, java.lang.String stylesheetPath, java.lang.String requestTypeToUseForInstances)` |
    `RequestTypeServer​(java.lang.String dataBaseFileName, java.lang.String savedImagesFolderName, int dicomPort, java.lang.String calledAETitle, int wadoPort, java.lang.String rootURL, java.lang.String stylesheetPath, java.lang.String requestTypeToUseForInstances, int numberOfWorkers)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected HttpServer.Worker` | `createWorker()` |
    `static void` | `main​(java.lang.String[] arg)` | Wait for http connections and process requests; also wait for DICOM associations and store received files in the database.

    - ### Methods inherited from class com.pixelmed.web.HttpServer

      `initializeThreadPool, initializeThreadPool, run`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RequestTypeServer

          public RequestTypeServer​(java.lang.String dataBaseFileName,
                                   java.lang.String savedImagesFolderName,
                                   int dicomPort,
                                   java.lang.String calledAETitle,
                                   int wadoPort,
                                   java.lang.String rootURL,
                                   java.lang.String stylesheetPath,
                                   java.lang.String requestTypeToUseForInstances,
                                   int numberOfWorkers)

    - #### RequestTypeServer

          public RequestTypeServer​(java.lang.String dataBaseFileName,
                                   java.lang.String savedImagesFolderName,
                                   int dicomPort,
                                   java.lang.String calledAETitle,
                                   int wadoPort,
                                   java.lang.String rootURL,
                                   java.lang.String stylesheetPath,
                                   java.lang.String requestTypeToUseForInstances)

    - #### RequestTypeServer

          public RequestTypeServer​(DatabaseInformationModel databaseInformationModel,
                                   WebServerApplicationProperties webServerApplicationProperties)

    - #### RequestTypeServer

          public RequestTypeServer​(DatabaseInformationModel databaseInformationModel,
                                   int wadoPort,
                                   java.lang.String rootURL,
                                   java.lang.String stylesheetPath,
                                   java.lang.String requestTypeToUseForInstances)

  - ### Method Detail

    - #### createWorker

          protected HttpServer.Worker createWorker()

      Specified by:
        `createWorker` in class `HttpServer`

    - #### main

          public static void main​(java.lang.String[] arg)

      Wait for http connections and process requests; also wait for DICOM associations and store received files in the database.

      Parameters:
        `arg` - array of seven strings - the database filename, the saved images folder, the DICOM port, the DICOM AET, the HTTP port, the host address to build the root URL, the request type to use for instances (one of INSTANCELIST, IMAGEDISPLAY, or APPLETDISPLAY),