Class StateExtension

  • All Implemented Interfaces:
    com.github.tomakehurst.wiremock.extension.ExtensionFactory
    Direct Known Subclasses:
    StandaloneStateExtension

    public class StateExtension
    extends java.lang.Object
    implements com.github.tomakehurst.wiremock.extension.ExtensionFactory
    Factory to register all extensions for handling state.

    Register with:

    
         private static final Store<String, Object> store = new CaffeineStore();
    
         {@literal @}RegisterExtension
         public static WireMockExtension wm = WireMockExtension.newInstance()
             .options(
                 wireMockConfig().dynamicPort().dynamicHttpsPort()
                     .extensions(new StateExtension(store))
             )
             .build();
          
     
    • Constructor Summary

      Constructors 
      Constructor Description
      StateExtension​(com.github.tomakehurst.wiremock.store.Store<java.lang.String,​java.lang.Object> store)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<com.github.tomakehurst.wiremock.extension.Extension> create​(com.github.tomakehurst.wiremock.extension.WireMockServices services)  
      • 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.ExtensionFactory

        isLoadable
    • Constructor Detail

      • StateExtension

        public StateExtension​(com.github.tomakehurst.wiremock.store.Store<java.lang.String,​java.lang.Object> store)
    • Method Detail

      • create

        public java.util.List<com.github.tomakehurst.wiremock.extension.Extension> create​(com.github.tomakehurst.wiremock.extension.WireMockServices services)
        Specified by:
        create in interface com.github.tomakehurst.wiremock.extension.ExtensionFactory