Class AsyncApiControlPlaneImpl
java.lang.Object
org.mockserver.async.controlplane.AsyncApiControlPlaneImpl
- All Implemented Interfaces:
org.mockserver.async.AsyncApiControlPlane
public class AsyncApiControlPlaneImpl
extends Object
implements org.mockserver.async.AsyncApiControlPlane
Implementation of
AsyncApiControlPlane that lives in the mockserver-async
module and is registered into the core's AsyncApiControlPlaneRegistry
at server startup.
Handles:
- Loading AsyncAPI specs via the REST control-plane
- Creating publishers and subscribers for each channel
- Schema validation of generated and consumed messages
- Returning status including recorded messages
- Resetting all state on server reset
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a control-plane with noConfigurationinstance, falling back entirely to the staticConfigurationPropertiesstore for async broker defaults.AsyncApiControlPlaneImpl(org.mockserver.configuration.Configuration configuration) Create a control-plane bound to the server'sConfigurationinstance so that instance-set async broker defaults are honoured. -
Method Summary
Modifier and TypeMethodDescriptiongenerateHttpExpectations(String requestBody) com.fasterxml.jackson.databind.JsonNodestatic voidRegister this implementation into the core registry, without aConfigurationinstance.static voidregisterIfAvailable(org.mockserver.configuration.Configuration configuration) Register this implementation into the core registry.voidreset()com.fasterxml.jackson.databind.JsonNodestatus()
-
Constructor Details
-
AsyncApiControlPlaneImpl
public AsyncApiControlPlaneImpl()Create a control-plane with noConfigurationinstance, falling back entirely to the staticConfigurationPropertiesstore for async broker defaults. -
AsyncApiControlPlaneImpl
public AsyncApiControlPlaneImpl(org.mockserver.configuration.Configuration configuration) Create a control-plane bound to the server'sConfigurationinstance so that instance-set async broker defaults are honoured.- Parameters:
configuration- the server configuration, ornullto use only the static store
-
-
Method Details
-
registerIfAvailable
public static void registerIfAvailable()Register this implementation into the core registry, without aConfigurationinstance. PreferregisterIfAvailable(Configuration)so that instance-set configuration is honoured. -
registerIfAvailable
public static void registerIfAvailable(org.mockserver.configuration.Configuration configuration) Register this implementation into the core registry. Call at server startup (e.g. from MockServerLifeCycle or Main).- Parameters:
configuration- the server configuration, ornullto use only the static store
-
load
- Specified by:
loadin interfaceorg.mockserver.async.AsyncApiControlPlane
-
status
public com.fasterxml.jackson.databind.JsonNode status()- Specified by:
statusin interfaceorg.mockserver.async.AsyncApiControlPlane
-
verify
- Specified by:
verifyin interfaceorg.mockserver.async.AsyncApiControlPlane
-
generateHttpExpectations
- Specified by:
generateHttpExpectationsin interfaceorg.mockserver.async.AsyncApiControlPlane
-
reset
public void reset()- Specified by:
resetin interfaceorg.mockserver.async.AsyncApiControlPlane
-