Interface ParseNodeFactory

All Known Implementing Classes:
BackingStoreParseNodeFactory, ParseNodeFactoryRegistry, ParseNodeProxyFactory

public interface ParseNodeFactory
Defines the contract for a factory that is used to create ParseNodes.
  • Method Details

    • getValidContentType

      @Nonnull String getValidContentType()
      Returns the content type this factory's parse nodes can deserialize.
      Returns:
      the content type this factory's parse nodes can deserialize.
    • getParseNode

      @Nonnull ParseNode getParseNode(@Nonnull String contentType, @Nonnull InputStream rawResponse)
      Creates a ParseNode from the given InputStream and content type.
      Parameters:
      contentType - the content type of the InputStream.
      rawResponse - the InputStream to read from.
      Returns:
      a ParseNode that can deserialize the given InputStream.