# Class PojoEndpointServer

java.lang.Object
jakarta.websocket.Endpoint
org.apache.tomcat.websocket.pojo.PojoEndpointBase
org.apache.tomcat.websocket.pojo.PojoEndpointServer

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PojoEndpointServer(Map<String,String> pathParameters, Object pojo)`
  Constructs a new PojoEndpointServer.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onOpen(Session session, EndpointConfig endpointConfig)`
  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

  - ### PojoEndpointServer

    public PojoEndpointServer(Map<String,String> pathParameters, Object pojo)
    Constructs a new PojoEndpointServer.
    Parameters:
      `pathParameters` - the path parameters for the endpoint
      `pojo` - the POJO instance annotated with `@ServerEndpoint`

- ## Method Details

  - ### onOpen

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