Top Description Fields Constructors Methods
org.springframework.web.socket.handler

public Class BeanCreatingHandlerProvider<T>

extends Object
implements BeanFactoryAware
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.Aware
Type Parameters
<T>
the handler type
Imports
org.springframework.beans.BeanUtils, org.springframework.beans.factory.BeanFactory, .BeanFactoryAware, org.springframework.beans.factory.config.AutowireCapableBeanFactory, org.springframework.lang.Nullable, org.springframework.util.Assert

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.
Author
Rossen Stoyanchev
Since
4.0

Field Summary

Modifier and TypeField and Description
private AutowireCapableBeanFactory
private final Class<? extends T>

Constructor Summary

AccessConstructor and Description
public
BeanCreatingHandlerProvider(Class<? extends T> handlerType)

Method Summary

Modifier and TypeMethod and Description
public void
destroy(T handler)

public T
public Class<? extends T>
public void
setBeanFactory(BeanFactory
owning BeanFactory (never null). The bean can immediately call methods on the factory.
beanFactory
)

Implements org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

Callback that supplies the owning factory to a bean instance.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

beanFactoryback to summary
private AutowireCapableBeanFactory beanFactory
Annotations
@Nullable
handlerTypeback to summary
private final Class<? extends T> handlerType

Constructor Detail

BeanCreatingHandlerProviderback to summary
public BeanCreatingHandlerProvider(Class<? extends T> handlerType)

Method Detail

destroyback to summary
public void destroy(T handler)
getHandlerback to summary
public T getHandler()
getHandlerTypeback to summary
public Class<? extends T> getHandlerType()
setBeanFactoryback to summary
public void setBeanFactory(BeanFactory beanFactory)

Implements org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

Doc from org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

Callback that supplies the owning factory to a bean instance.

Invoked after the population of normal bean properties but before an initialization callback such as InitializingBean#afterPropertiesSet() or a custom init-method.

Parameters
beanFactory:BeanFactory

owning BeanFactory (never null). The bean can immediately call methods on the factory.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override