Package de.pangaea.metadataportal.push

## Class PushServer

- java.lang.Object
- - de.pangaea.metadataportal.push.PushServer

-     public class PushServer
      extends Object

  Provides a simple HTTP server that accepts push requests. It can be used as a replacement for a real harvester. In such cases, it is recommended to use `NoOpHarvester` in the config. Once started, the server by default listens on 127.0.0.1, port 8089.

  You can index a document by doing a `PUT` request and delete documents by doing a `DELETE` request. The path pattern is: `/harvesterID/identifier`. If the harvester does not exist a 404 Not Found is returned. The push server

  To configure host and port, pass system properties `server.host` and `server.port`. If you want to prepend all path names with some constant prefix, pass system property `server.rootPath`. This prepends this path to the above pattern.

  Author:
    Uwe Schindler
  See Also:
    `NoOpHarvester`

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PushServer​(Config conf, String host, int port, String rootPath)` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `main​(String... args)` |

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

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

- - ### Constructor Detail

    - #### PushServer

          public PushServer​(Config conf,
                            String host,
                            int port,
                            String rootPath)

  - ### Method Detail

    - #### main

          public static void main​(String... args)
                           throws Exception

      Throws:
        `Exception`