Package org.apache.tomcat.websocket
Class PojoClassHolder
- java.lang.Object
-
- org.apache.tomcat.websocket.PojoClassHolder
-
- All Implemented Interfaces:
ClientEndpointHolder
public class PojoClassHolder extends java.lang.Object implements ClientEndpointHolder
Holds a POJO class for use as a WebSocket client endpoint.
-
-
Constructor Summary
Constructors Constructor Description PojoClassHolder(java.lang.Class<?> pojoClazz, ClientEndpointConfig clientEndpointConfig)Constructs a new PojoClassHolder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetClassName()Returns the fully qualified class name of the endpoint.EndpointgetInstance(InstanceManager instanceManager)Returns an instance of the endpoint using the given instance manager.
-
-
-
Constructor Detail
-
PojoClassHolder
public PojoClassHolder(java.lang.Class<?> pojoClazz, ClientEndpointConfig clientEndpointConfig)Constructs a new PojoClassHolder.- Parameters:
pojoClazz- the POJO class annotated with@ClientEndpointclientEndpointConfig- the client endpoint configuration
-
-
Method Detail
-
getClassName
public java.lang.String getClassName()
Description copied from interface:ClientEndpointHolderReturns the fully qualified class name of the endpoint.- Specified by:
getClassNamein interfaceClientEndpointHolder- Returns:
- the class name
-
getInstance
public Endpoint getInstance(InstanceManager instanceManager) throws DeploymentException
Description copied from interface:ClientEndpointHolderReturns an instance of the endpoint using the given instance manager.- Specified by:
getInstancein interfaceClientEndpointHolder- Parameters:
instanceManager- the instance manager to create the endpoint- Returns:
- the endpoint instance
- Throws:
DeploymentException- if the endpoint cannot be instantiated
-
-