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 Modifier and Type Field Description static intHTTP_UNPROCESSABLE_ENTITY
-
Constructor Summary
Constructors Constructor Description KubernetesCrudDispatcher()KubernetesCrudDispatcher(KubernetesCrudAttributesExtractor attributeExtractor, io.fabric8.mockwebserver.crud.ResponseComposer responseComposer)KubernetesCrudDispatcher(List<CustomResourceDefinitionContext> crdContexts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description okhttp3.mockwebserver.MockResponsedispatch(okhttp3.mockwebserver.RecordedRequest request)okhttp3.mockwebserver.MockResponsehandleCreate(String path, String s)Adds the specified object to the in-memory db.okhttp3.mockwebserver.MockResponsehandleDelete(String path)Performs a delete for the corresponding object from the in-memory db.okhttp3.mockwebserver.MockResponsehandleGet(String path)Performs a get for the corresponding object from the in-memory db.okhttp3.mockwebserver.MockResponsehandlePatch(String path, String s)Patches the specified object to the in-memory db.okhttp3.mockwebserver.MockResponsehandleReplace(String path, String s)Replace the object on `path` endpoint with the object represented by `s`okhttp3.mockwebserver.MockResponsehandleWatch(String path)Watch the resource list on `path` endpoint
-
-
-
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(List<CustomResourceDefinitionContext> crdContexts)
-
KubernetesCrudDispatcher
public KubernetesCrudDispatcher(KubernetesCrudAttributesExtractor attributeExtractor, io.fabric8.mockwebserver.crud.ResponseComposer responseComposer)
-
-
Method Detail
-
dispatch
public okhttp3.mockwebserver.MockResponse dispatch(okhttp3.mockwebserver.RecordedRequest request)
- Overrides:
dispatchin classio.fabric8.mockwebserver.crud.CrudDispatcher
-
handleCreate
public okhttp3.mockwebserver.MockResponse handleCreate(String path, String s)
Adds the specified object to the in-memory db.- Overrides:
handleCreatein classio.fabric8.mockwebserver.crud.CrudDispatcher- Parameters:
path- Strings- 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- Strings- 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:
handleGetin classio.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:
handlePatchin classio.fabric8.mockwebserver.crud.CrudDispatcher- Parameters:
path- path of resources- 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:
handleDeletein classio.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
-
-