# Class TransformationFactory

java.lang.Object
org.apache.tomcat.websocket.TransformationFactory

public class TransformationFactory extends Object
Factory for managing WebSocket transformation builders.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Transformation`
  `create(String name, List<List<Extension.Parameter>> preferences, boolean isServer)`
  Creates a transformation for the given extension.
  `Set<String>`
  `getInstalledExtensionNames()`
  Returns the names of all registered extensions.
  `Set<Extension>`
  `getInstalledExtensions()`
  Returns all registered extensions.
  `static TransformationFactory`
  `getInstance()`
  Returns the singleton TransformationFactory instance.
  `void`
  `registerExtension(String name, TransformationBuilder builder)`
  Registers a transformation builder for the given extension name.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getInstance

    public static TransformationFactory getInstance()
    Returns the singleton TransformationFactory instance.
    Returns:
      the factory instance

  - ### create

    public Transformation create(String name, List<List<Extension.Parameter>> preferences, boolean isServer)
    Creates a transformation for the given extension.
    Parameters:
      `name` - the extension name
      `preferences` - the negotiated parameters
      `isServer` - true if creating for the server side
    Returns:
      the transformation, or null if not found

  - ### registerExtension

    public void registerExtension(String name, TransformationBuilder builder)
    Registers a transformation builder for the given extension name.
    Parameters:
      `name` - the extension name
      `builder` - the transformation builder

  - ### getInstalledExtensionNames

    public Set<String> getInstalledExtensionNames()
    Returns the names of all registered extensions.
    Returns:
      the set of extension names

  - ### getInstalledExtensions

    public Set<Extension> getInstalledExtensions()
    Returns all registered extensions.
    Returns:
      the set of extensions