Package org.apache.tomcat.websocket.pojo

## Class PojoMethodMapping

- java.lang.Object
- - org.apache.tomcat.websocket.pojo.PojoMethodMapping

    public class PojoMethodMapping
    extends java.lang.Object

For a POJO class annotated with `ServerEndpoint`, an instance of this class creates and caches the method handler, method information and parameter information for the onXXX calls.

### Constructor Summary

Constructors
`PojoMethodMapping​(java.lang.Class<?> clazzPojo, java.util.List<java.lang.Class<? extends Decoder>> decoderClazzes, java.lang.String wsPath)` Deprecated. Will be removed in Tomcat 10.1.x Use (@link `PojoMethodMapping(Class, List, String, InstanceManager)`
`PojoMethodMapping​(java.lang.Class<?> clazzPojo, java.util.List<java.lang.Class<? extends Decoder>> decoderClazzes, java.lang.String wsPath, InstanceManager instanceManager)` Create a method mapping for the given POJO

### Method Summary

All Methods Instance Methods Concrete Methods
`java.util.Set<MessageHandler>` `getMessageHandlers​(java.lang.Object pojo, java.util.Map<java.lang.String,​java.lang.String> pathParameters, Session session, EndpointConfig config)`
`java.lang.reflect.Method` `getOnClose()`
`java.lang.Object[]` `getOnCloseArgs​(java.util.Map<java.lang.String,​java.lang.String> pathParameters, Session session, CloseReason closeReason)`
`java.lang.reflect.Method` `getOnError()`
`java.lang.Object[]` `getOnErrorArgs​(java.util.Map<java.lang.String,​java.lang.String> pathParameters, Session session, java.lang.Throwable throwable)`
`java.lang.reflect.Method` `getOnOpen()`
`java.lang.Object[]` `getOnOpenArgs​(java.util.Map<java.lang.String,​java.lang.String> pathParameters, Session session, EndpointConfig config)`
`java.lang.String` `getWsPath()`
`boolean` `hasMessageHandlers()`

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

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

### Constructor Detail

#### PojoMethodMapping

    @Deprecated
    public PojoMethodMapping​(java.lang.Class<?> clazzPojo,
                             java.util.List<java.lang.Class<? extends Decoder>> decoderClazzes,
                             java.lang.String wsPath)
                      throws DeploymentException

Deprecated.
Will be removed in Tomcat 10.1.x Use (@link `PojoMethodMapping(Class, List, String, InstanceManager)`
Create a method mapping for the given POJO

Parameters:
  `clazzPojo` - POJO implementation class
  `decoderClazzes` - Set of potential decoder classes
  `wsPath` - Path at which the endpoint will be deployed
Throws:
  `DeploymentException` - If the mapping cannot be completed

#### PojoMethodMapping

    public PojoMethodMapping​(java.lang.Class<?> clazzPojo,
                             java.util.List<java.lang.Class<? extends Decoder>> decoderClazzes,
                             java.lang.String wsPath,
                             InstanceManager instanceManager)
                      throws DeploymentException

Create a method mapping for the given POJO

Parameters:
  `clazzPojo` - POJO implementation class
  `decoderClazzes` - Set of potential decoder classes
  `wsPath` - Path at which the endpoint will be deployed
  `instanceManager` - Instance manager to use to create Decoder instances
Throws:
  `DeploymentException` - If the mapping cannot be completed

### Method Detail

#### getWsPath

    public java.lang.String getWsPath()

#### getOnOpen

    public java.lang.reflect.Method getOnOpen()

#### getOnOpenArgs

    public java.lang.Object[] getOnOpenArgs​(java.util.Map<java.lang.String,​java.lang.String> pathParameters,
                                            Session session,
                                            EndpointConfig config)
                                     throws DecodeException

Throws:
  `DecodeException`

#### getOnClose

    public java.lang.reflect.Method getOnClose()

#### getOnCloseArgs

    public java.lang.Object[] getOnCloseArgs​(java.util.Map<java.lang.String,​java.lang.String> pathParameters,
                                             Session session,
                                             CloseReason closeReason)
                                      throws DecodeException

Throws:
  `DecodeException`

#### getOnError

    public java.lang.reflect.Method getOnError()

#### getOnErrorArgs

    public java.lang.Object[] getOnErrorArgs​(java.util.Map<java.lang.String,​java.lang.String> pathParameters,
                                             Session session,
                                             java.lang.Throwable throwable)
                                      throws DecodeException

Throws:
  `DecodeException`

#### hasMessageHandlers

    public boolean hasMessageHandlers()

#### getMessageHandlers

    public java.util.Set<MessageHandler> getMessageHandlers​(java.lang.Object pojo,
                                                            java.util.Map<java.lang.String,​java.lang.String> pathParameters,
                                                            Session session,
                                                            EndpointConfig config)