org.apache.jmeter.protocol.http.proxy

## Interface SamplerCreator

- All Known Implementing Classes:
    AbstractSamplerCreator, DefaultSamplerCreator

      public interface SamplerCreator

  Factory of sampler

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `HTTPSamplerBase` | `createAndPopulateSampler(HttpRequestHdr request, java.util.Map<java.lang.String,java.lang.String> pageEncodings, java.util.Map<java.lang.String,java.lang.String> formEncodings)` Default implementation calls: `SamplerCreator` `createSampler(HttpRequestHdr, Map, Map)` `SamplerCreator` `populateSampler(HTTPSamplerBase, HttpRequestHdr, Map, Map)`
    `java.util.List<TestElement>` | `createChildren(HTTPSamplerBase sampler, SampleResult result)` Create sampler children.
    `HTTPSamplerBase` | `createSampler(HttpRequestHdr request, java.util.Map<java.lang.String,java.lang.String> pageEncodings, java.util.Map<java.lang.String,java.lang.String> formEncodings)` Create HTTPSamplerBase
    `java.lang.String[]` | `getManagedContentTypes()`
    `void` | `populateSampler(HTTPSamplerBase sampler, HttpRequestHdr request, java.util.Map<java.lang.String,java.lang.String> pageEncodings, java.util.Map<java.lang.String,java.lang.String> formEncodings)` Populate sampler from request
    `void` | `postProcessSampler(HTTPSamplerBase sampler, SampleResult result)` Post process sampler Called after sampling

- - ### Method Detail

    - #### getManagedContentTypes

          java.lang.String[] getManagedContentTypes()

      Returns:
        String[] array of Content types managed by Factory

    - #### createSampler

          HTTPSamplerBase createSampler(HttpRequestHdr request,
                                        java.util.Map<java.lang.String,java.lang.String> pageEncodings,
                                        java.util.Map<java.lang.String,java.lang.String> formEncodings)

      Create HTTPSamplerBase
      Parameters:
        `request` - `HttpRequestHdr`
        `pageEncodings` - Map of page encodings
        `formEncodings` - Map of form encodings
      Returns:
        `HTTPSamplerBase`

    - #### populateSampler

          void populateSampler(HTTPSamplerBase sampler,
                               HttpRequestHdr request,
                               java.util.Map<java.lang.String,java.lang.String> pageEncodings,
                               java.util.Map<java.lang.String,java.lang.String> formEncodings)
                        throws java.lang.Exception

      Populate sampler from request
      Parameters:
        `sampler` - `HTTPSamplerBase`
        `request` - `HttpRequestHdr`
        `pageEncodings` - Map of page encodings
        `formEncodings` - Map of form encodings
      Throws:
        `java.lang.Exception` - when something fails

    - #### postProcessSampler

          void postProcessSampler(HTTPSamplerBase sampler,
                                  SampleResult result)

      Post process sampler Called after sampling
      Parameters:
        `sampler` - HTTPSamplerBase
        `result` - SampleResult
      Since:
        2.9

    - #### createAndPopulateSampler

          HTTPSamplerBase createAndPopulateSampler(HttpRequestHdr request,
                                                   java.util.Map<java.lang.String,java.lang.String> pageEncodings,
                                                   java.util.Map<java.lang.String,java.lang.String> formEncodings)
                                            throws java.lang.Exception

      Default implementation calls:
      1. `SamplerCreator` `createSampler(HttpRequestHdr, Map, Map)`
      2. `SamplerCreator` `populateSampler(HTTPSamplerBase, HttpRequestHdr, Map, Map)`
      Parameters:
        `request` - `HttpRequestHdr`
        `pageEncodings` - Map of page encodings
        `formEncodings` - Map of form encodings
      Returns:
        `HTTPSamplerBase`
      Throws:
        `java.lang.Exception` - when something fails
      Since:
        2.9

    - #### createChildren

          java.util.List<TestElement> createChildren(HTTPSamplerBase sampler,
                                                     SampleResult result)

      Create sampler children. This method can be used to add PostProcessor or ResponseAssertions by implementations of `SamplerCreator`. Return empty list if nothing to create
      Parameters:
        `sampler` - `HTTPSamplerBase`
        `result` - `SampleResult`
      Returns:
        List

Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.