Package org.apache.tomcat.websocket
Class PojoHolder
- java.lang.Object
-
- org.apache.tomcat.websocket.PojoHolder
-
- All Implemented Interfaces:
ClientEndpointHolder
public class PojoHolder extends java.lang.Object implements ClientEndpointHolder
Holds a POJO instance for use as a WebSocket client endpoint.
-
-
Constructor Summary
Constructors Constructor Description PojoHolder(java.lang.Object pojo, ClientEndpointConfig clientEndpointConfig)Constructs a new PojoHolder.
-
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
-
PojoHolder
public PojoHolder(java.lang.Object pojo, ClientEndpointConfig clientEndpointConfig)Constructs a new PojoHolder.- Parameters:
pojo- the POJO instance 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
-
-