Class KubernetesCrudDispatcher

java.lang.Object
okhttp3.mockwebserver.Dispatcher
io.fabric8.mockwebserver.crud.CrudDispatcher
io.fabric8.kubernetes.client.server.mock.KubernetesCrudDispatcher

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

    Fields inherited from class io.fabric8.mockwebserver.crud.CrudDispatcher

    attributeExtractor, context, map, responseComposer
  • Constructor Summary

    Constructors 
    Constructor Description
    KubernetesCrudDispatcher()  
    KubernetesCrudDispatcher​(KubernetesCrudAttributesExtractor attributeExtractor, io.fabric8.mockwebserver.crud.ResponseComposer responseComposer)  
  • Method Summary

    Modifier and Type Method Description
    okhttp3.mockwebserver.MockResponse dispatch​(okhttp3.mockwebserver.RecordedRequest request)  
    okhttp3.mockwebserver.MockResponse handleCreate​(String path, String s)
    Adds the specified object to the in-memory db.
    okhttp3.mockwebserver.MockResponse handleDelete​(String path)
    Performs a delete for the corresponding object from the in-memory db.
    okhttp3.mockwebserver.MockResponse handleGet​(String path)
    Performs a get for the corresponding object from the in-memory db.
    okhttp3.mockwebserver.MockResponse handlePatch​(String path, String s)
    Patches the specified object to the in-memory db.
    okhttp3.mockwebserver.MockResponse handleReplace​(String path, String s)
    Replace the object on `path` endpoint with the object represented by `s`
    okhttp3.mockwebserver.MockResponse handleWatch​(String path)
    Watch the resource list on `path` endpoint

    Methods inherited from class io.fabric8.mockwebserver.crud.CrudDispatcher

    getAttributeExtractor, getMap, getResponseComposer, handleUpdate

    Methods inherited from class okhttp3.mockwebserver.Dispatcher

    peek, shutdown

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • 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