PojoClassHolder (Apache Tomcat 11.0.23 API Documentation)
Description: declaration: package: org.apache.tomcat.websocket, class: PojoClassHolder

# Class PojoClassHolder

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

All Implemented Interfaces:
  `ClientEndpointHolder`

public class PojoClassHolder extends Object implements ClientEndpointHolder
Holds a POJO class for use as a WebSocket client endpoint.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PojoClassHolder(Class<?> pojoClazz, ClientEndpointConfig clientEndpointConfig)`
  Constructs a new PojoClassHolder.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getClassName()`
  Returns the fully qualified class name of the endpoint.
  `Endpoint`
  `getInstance(InstanceManager instanceManager)`
  Returns an instance of the endpoint using the given instance manager.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### PojoClassHolder

    public PojoClassHolder(Class<?> pojoClazz, ClientEndpointConfig clientEndpointConfig)
    Constructs a new PojoClassHolder.
    Parameters:
      `pojoClazz` - the POJO class annotated with `@ClientEndpoint`
      `clientEndpointConfig` - the client endpoint configuration

- ## Method Details

  - ### getClassName

    public String getClassName()
    Description copied from interface: `ClientEndpointHolder`
    Returns the fully qualified class name of the endpoint.
    Specified by:
      `getClassName` in interface `ClientEndpointHolder`
    Returns:
      the class name

  - ### getInstance

    public Endpoint getInstance(InstanceManager instanceManager) throws DeploymentException
    Description copied from interface: `ClientEndpointHolder`
    Returns an instance of the endpoint using the given instance manager.
    Specified by:
      `getInstance` in interface `ClientEndpointHolder`
    Parameters:
      `instanceManager` - the instance manager to create the endpoint
    Returns:
      the endpoint instance
    Throws:
      `DeploymentException` - if the endpoint cannot be instantiated