PojoEndpointBase (Apache Tomcat 9.0.37 API Documentation)

org.apache.tomcat.websocket.pojo

## Class PojoEndpointBase

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

- Direct Known Subclasses:
    PojoEndpointClient, PojoEndpointServer

      public abstract class PojoEndpointBase
      extends Endpoint

  Base implementation (client and server have different concrete implementations) of the wrapper that converts a POJO instance into a WebSocket endpoint instance.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PojoEndpointBase()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `doOnOpen(Session session, EndpointConfig config)`
    `protected PojoMethodMapping` | `getMethodMapping()`
    `protected Map<String,String>` | `getPathParameters()`
    `protected Object` | `getPojo()`
    `void` | `onClose(Session session, CloseReason closeReason)` Event that is triggered when a session has closed.
    `void` | `onError(Session session, Throwable throwable)` Event that is triggered when a protocol error occurs.
    `protected void` | `setMethodMapping(PojoMethodMapping methodMapping)`
    `protected void` | `setPathParameters(Map<String,String> pathParameters)`
    `protected void` | `setPojo(Object pojo)`

    - ### Methods inherited from class javax.websocket.Endpoint

      `onOpen`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### PojoEndpointBase

          public PojoEndpointBase()

  - ### Method Detail

    - #### doOnOpen

          protected final void doOnOpen(Session session,
                                        EndpointConfig config)

    - #### onClose

          public final void onClose(Session session,
                                    CloseReason closeReason)

      Description copied from class: `javax.websocket.Endpoint`
      Event that is triggered when a session has closed.
      Overrides:
        `onClose` in class `Endpoint`
      Parameters:
        `session` - The session
        `closeReason` - Why the session was closed

    - #### onError

          public final void onError(Session session,
                                    Throwable throwable)

      Description copied from class: `javax.websocket.Endpoint`
      Event that is triggered when a protocol error occurs.
      Overrides:
        `onError` in class `Endpoint`
      Parameters:
        `session` - The session.
        `throwable` - The exception.

    - #### getPojo

          protected Object getPojo()

    - #### setPojo

          protected void setPojo(Object pojo)

    - #### getPathParameters

          protected Map<String,String> getPathParameters()

    - #### setPathParameters

          protected void setPathParameters(Map<String,String> pathParameters)

    - #### getMethodMapping

          protected PojoMethodMapping getMethodMapping()

    - #### setMethodMapping

          protected void setMethodMapping(PojoMethodMapping methodMapping)

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.