org.apache.nutch.api.resources

## Class AbstractResource

- java.lang.Object
- - org.apache.nutch.api.resources.AbstractResource

- Direct Known Subclasses:
    AdminResource, ConfigResource, DbResource, JobResource, SeedResource

      public abstract class AbstractResource
      extends java.lang.Object

  Abstract base class for `NutchServer` REST APIs.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `activeConfId`
    `protected ConfManager` | `configManager`
    `protected JobManager` | `jobManager`
    `protected NutchServer` | `server`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractResource()` Constructor method for `AbstractResource` Retrieves `NutchServer` information from `Context`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `throwBadRequestException(java.lang.String message)` Throws HTTP 400 Bad Request Exception with given message

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

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

- - ### Field Detail

    - #### configManager

          protected ConfManager configManager

    - #### jobManager

          protected JobManager jobManager

    - #### activeConfId

          protected java.lang.String activeConfId

    - #### server

          protected NutchServer server

  - ### Constructor Detail

    - #### AbstractResource

          public AbstractResource()

      Constructor method for `AbstractResource` Retrieves `NutchServer` information from `Context`

  - ### Method Detail

    - #### throwBadRequestException

          protected void throwBadRequestException(java.lang.String message)

      Throws HTTP 400 Bad Request Exception with given message
      Parameters:
        `message` - message to be placed at exception

Copyright © 2019 The Apache Software Foundation