Example usage for org.springframework.scheduling TaskScheduler getClass

List of usage examples for org.springframework.scheduling TaskScheduler getClass

Introduction

In this page you can find the example usage for org.springframework.scheduling TaskScheduler getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:com.payu.ratel.config.beans.InMemoryRegistryBeanProviderFactory.java

@Override
public void afterPropertiesSet() {
    final Environment env = beanFactory.getBean(Environment.class);
    TaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
    final String schedulerBeanName = taskScheduler.getClass().getName();
    beanFactory.registerSingleton(schedulerBeanName, taskScheduler);
    beanFactory.initializeBean(taskScheduler, schedulerBeanName);

    final String inMemoryServerAddress = getRatelServiceAddress(env);
    final DiscoveryClient discoveryClient = new DiscoveryClient(inMemoryServerAddress);
    this.ratelServerFetcher = new RatelServerFetcher(discoveryClient);

    this.ratelServerProxyGenerator = new RatelServerProxyGenerator(beanFactory);

    this.ratelServerRegistry = new RatelServerRegistry(new RemoteRestDiscoveryServer(inMemoryServerAddress),
            taskScheduler);/*from  w w  w  .java2  s. co  m*/
}