Class ContentDecoder.Factory

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.client.ContentDecoder.Factory
All Implemented Interfaces:
org.eclipse.jetty.util.component.Container, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.Dumpable.DumpableContainer, org.eclipse.jetty.util.component.LifeCycle
Enclosing interface:
ContentDecoder

public abstract static class ContentDecoder.Factory extends org.eclipse.jetty.util.component.ContainerLifeCycle

A factory for Content.Source that decode response content.

A Factory has an encoding and a weight that are used in the Accept-Encoding request header and in the Content-Encoding response headers.

Factory instances are configured in HttpClient via HttpClient.getContentDecoderFactories().

  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopException

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container

    org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable

    org.eclipse.jetty.util.component.Dumpable.DumpableContainer, org.eclipse.jetty.util.component.Dumpable.DumpAppendable

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

    org.eclipse.jetty.util.component.LifeCycle.Listener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final float
     

    Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    FAILED, STARTED, STARTING, STOPPED, STOPPING

    Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

    LEGEND
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Factory(String encoding)
     
    protected
    Factory(String encoding, float weight)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
     
    float
     
    int
     
    abstract org.eclipse.jetty.io.Content.Source
    newDecoderContentSource(org.eclipse.jetty.io.Content.Source contentSource)
    Creates a Content.Source that decodes the chunks of the given Content.Source parameter.

    Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle

    addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans

    Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toString

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.jetty.util.component.Container

    getCachedBeans, getEventListeners

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable

    dumpSelf

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    isDumpable
  • Field Details

  • Constructor Details

    • Factory

      protected Factory(String encoding)
    • Factory

      protected Factory(String encoding, float weight)
  • Method Details

    • getEncoding

      public String getEncoding()
      Returns:
      the type of the decoders created by this factory
    • getWeight

      public float getWeight()
      Returns:
      the weight (between 0 and 1, at most 3 decimal digits) to use for the Accept-Encoding request header
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • newDecoderContentSource

      public abstract org.eclipse.jetty.io.Content.Source newDecoderContentSource(org.eclipse.jetty.io.Content.Source contentSource)

      Creates a Content.Source that decodes the chunks of the given Content.Source parameter.

      Parameters:
      contentSource - the encoded Content.Source
      Returns:
      the decoded Content.Source