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
-
Constructor Summary
Constructors Constructor Description KubernetesCrudDispatcher()KubernetesCrudDispatcher(KubernetesCrudAttributesExtractor attributeExtractor, io.fabric8.mockwebserver.crud.ResponseComposer responseComposer) -
Method Summary
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
-
Constructor Details
-
KubernetesCrudDispatcher
public KubernetesCrudDispatcher() -
KubernetesCrudDispatcher
public KubernetesCrudDispatcher(KubernetesCrudAttributesExtractor attributeExtractor, io.fabric8.mockwebserver.crud.ResponseComposer responseComposer)
-
-
Method Details
-
dispatch
public okhttp3.mockwebserver.MockResponse dispatch(okhttp3.mockwebserver.RecordedRequest request)- Overrides:
dispatchin classio.fabric8.mockwebserver.crud.CrudDispatcher
-
handleCreate
Adds the specified object to the in-memory db.- Overrides:
handleCreatein classio.fabric8.mockwebserver.crud.CrudDispatcher- Parameters:
path- Strings- String- Returns:
- The
MockResponse
-
handleReplace
Replace the object on `path` endpoint with the object represented by `s`- Parameters:
path- Strings- String- Returns:
- The
MockResponse
-
handleGet
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
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
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
Watch the resource list on `path` endpoint- Parameters:
path- String- Returns:
- The
MockResponse
-