Class KubernetesCrudDispatcher


  • public class KubernetesCrudDispatcher
    extends io.fabric8.mockwebserver.crud.CrudDispatcher
    • Field Detail

      • HTTP_UNPROCESSABLE_ENTITY

        public static final int HTTP_UNPROCESSABLE_ENTITY
        See Also:
        Constant Field Values
    • Constructor Detail

      • KubernetesCrudDispatcher

        public KubernetesCrudDispatcher()
      • KubernetesCrudDispatcher

        public KubernetesCrudDispatcher​(KubernetesCrudAttributesExtractor attributeExtractor,
                                        io.fabric8.mockwebserver.crud.ResponseComposer responseComposer)
    • Method Detail

      • dispatch

        public okhttp3.mockwebserver.MockResponse dispatch​(okhttp3.mockwebserver.RecordedRequest request)
        Overrides:
        dispatch in class io.fabric8.mockwebserver.crud.CrudDispatcher
      • handleCreate

        public okhttp3.mockwebserver.MockResponse handleCreate​(String path,
                                                               String s)
        Adds the specified object to the in-memory db.
        Overrides:
        handleCreate in class io.fabric8.mockwebserver.crud.CrudDispatcher
        Parameters:
        path - String
        s - String
        Returns:
        The MockResponse
      • handleReplace

        public okhttp3.mockwebserver.MockResponse handleReplace​(String path,
                                                                String s)
        Replace the object on `path` endpoint with the object represented by `s`
        Parameters:
        path - String
        s - String
        Returns:
        The MockResponse
      • handleGet

        public okhttp3.mockwebserver.MockResponse handleGet​(String path)
        Performs a get for the corresponding object from the in-memory db.
        Overrides:
        handleGet in class io.fabric8.mockwebserver.crud.CrudDispatcher
        Parameters:
        path - The path.
        Returns:
        The MockResponse
      • handlePatch

        public okhttp3.mockwebserver.MockResponse handlePatch​(String path,
                                                              String s)
        Patches the specified object to the in-memory db.
        Overrides:
        handlePatch in class io.fabric8.mockwebserver.crud.CrudDispatcher
        Parameters:
        path - path of resource
        s - object
        Returns:
        The MockResponse
      • handleDelete

        public okhttp3.mockwebserver.MockResponse handleDelete​(String path)
        Performs a delete for the corresponding object from the in-memory db.
        Overrides:
        handleDelete in class io.fabric8.mockwebserver.crud.CrudDispatcher
        Parameters:
        path - String
        Returns:
        The MockResponse
      • handleWatch

        public okhttp3.mockwebserver.MockResponse handleWatch​(String path)
        Watch the resource list on `path` endpoint
        Parameters:
        path - String
        Returns:
        The MockResponse