# Class PojoEndpointClient

java.lang.Object
javax.websocket.Endpoint
org.apache.tomcat.websocket.pojo.PojoEndpointBase
org.apache.tomcat.websocket.pojo.PojoEndpointClient

public class PojoEndpointClient extends PojoEndpointBase
Wrapper class for instances of POJOs annotated with `ClientEndpoint` so they appear as standard `Endpoint` instances.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PojoEndpointClient(Object pojo, List<Class<? extends Decoder>> decoders)`
  Deprecated.
  `PojoEndpointClient(Object pojo, List<Class<? extends Decoder>> decoders, InstanceManager instanceManager)`
  Constructs a new PojoEndpointClient.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onOpen(Session session, EndpointConfig config)`
  Event that is triggered when a new session starts.

  ### Methods inherited from class PojoEndpointBase

  `doOnOpen, getMethodMapping, getPojo, onClose, onError, setMethodMapping, setPojo`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### PojoEndpointClient

    @Deprecated public PojoEndpointClient(Object pojo, List<Class<? extends Decoder>> decoders) throws DeploymentException
    Deprecated.
    Throws:
      `DeploymentException`

  - ### PojoEndpointClient

    public PojoEndpointClient(Object pojo, List<Class<? extends Decoder>> decoders, InstanceManager instanceManager) throws DeploymentException
    Constructs a new PojoEndpointClient.
    Parameters:
      `pojo` - the POJO instance annotated with `@ClientEndpoint`
      `decoders` - the list of decoder classes
      `instanceManager` - the instance manager for lifecycle management
    Throws:
      `DeploymentException` - if the endpoint cannot be configured

- ## Method Details

  - ### onOpen

    public void onOpen(Session session, EndpointConfig config)
    Description copied from class: `javax.websocket.Endpoint`
    Event that is triggered when a new session starts.
    Specified by:
      `onOpen` in class `Endpoint`
    Parameters:
      `session` - The new session.
      `config` - The configuration with which the Endpoint was configured.