Package org.wiremock.webhooks
Class Webhooks
- java.lang.Object
-
- com.github.tomakehurst.wiremock.extension.PostServeAction
-
- org.wiremock.webhooks.Webhooks
-
- All Implemented Interfaces:
Extension,ServeEventListener
public class Webhooks extends PostServeAction implements ServeEventListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.tomakehurst.wiremock.extension.ServeEventListener
ServeEventListener.RequestPhase
-
-
Constructor Summary
Constructors Constructor Description Webhooks(WireMockServices wireMockServices, java.util.concurrent.ScheduledExecutorService scheduler, java.util.List<WebhookTransformer> transformers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterComplete(ServeEvent serveEvent, Parameters parameters)booleanapplyGlobally()voiddoAction(ServeEvent serveEvent, Admin admin, Parameters parameters)Do something after a request has been served.java.lang.StringgetName()static WebhookDefinitionwebhook()-
Methods inherited from class com.github.tomakehurst.wiremock.extension.PostServeAction
doGlobalAction
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.tomakehurst.wiremock.extension.ServeEventListener
afterMatch, beforeMatch, beforeResponseSent, onEvent
-
-
-
-
Constructor Detail
-
Webhooks
public Webhooks(WireMockServices wireMockServices, java.util.concurrent.ScheduledExecutorService scheduler, java.util.List<WebhookTransformer> transformers)
-
-
Method Detail
-
afterComplete
public void afterComplete(ServeEvent serveEvent, Parameters parameters)
- Specified by:
afterCompletein interfaceServeEventListener
-
doAction
public void doAction(ServeEvent serveEvent, Admin admin, Parameters parameters)
Description copied from class:PostServeActionDo something after a request has been served. Called when this extension is applied to a specific stub mapping.- Overrides:
doActionin classPostServeAction- Parameters:
serveEvent- the serve event, including the request and the response definitionadmin- WireMock's admin functionsparameters- the parameters passed to the extension from the stub mapping
-
applyGlobally
public boolean applyGlobally()
- Specified by:
applyGloballyin interfaceServeEventListener
-
webhook
public static WebhookDefinition webhook()
-
-