org.springframework.web.socket.handler

## Class BeanCreatingHandlerProvider<T>

- java.lang.Object
- - org.springframework.web.socket.handler.BeanCreatingHandlerProvider<T>

Type Parameters:
  `T` - the handler type

All Implemented Interfaces:
  org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware

    public class BeanCreatingHandlerProvider<T>
    extends Object
    implements org.springframework.beans.factory.BeanFactoryAware

Instantiates a target handler through a Spring `BeanFactory` and also provides an equivalent destroy method. Mainly for internal use to assist with initializing and destroying handlers with per-connection lifecycle.

Since:
  4.0
Author:
  Rossen Stoyanchev

### Constructor Summary

Constructors
Constructor and Description
`BeanCreatingHandlerProvider(Class<? extends T> handlerType)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `destroy(T handler)`
`T` `getHandler()`
`Class<? extends T>` `getHandlerType()`
`void` `setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)`
`String` `toString()`

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

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

### Constructor Detail

#### BeanCreatingHandlerProvider

    public BeanCreatingHandlerProvider(Class<? extends T> handlerType)

### Method Detail

#### setBeanFactory

    public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)

Specified by:
  `setBeanFactory` in interface `org.springframework.beans.factory.BeanFactoryAware`

#### destroy

    public void destroy(T handler)

#### getHandlerType

    public Class<? extends T> getHandlerType()

#### getHandler

    public T getHandler()

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`