All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.almis.awe.test.Suggest Maven / Gradle / Ivy

There is a newer version: 0.0.13
Show newest version
package com.almis.awe.test;

import com.almis.awe.config.ServiceConfig;
import com.almis.awe.exception.AWException;
import com.almis.awe.model.dto.ServiceData;
import com.almis.awe.service.QueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Suggest
 *
 * @author pvidal
 */
@Service
public class Suggest extends ServiceConfig {

  @Autowired
  QueryService queryService;

  /**
   * Get suggest with a delay
   * @param queryName Query name
   * @return User list
   * @throws AWException error in query
   * @throws InterruptedException Error in thread wait
   */
  public ServiceData delayedSuggest(String queryName) throws AWException, InterruptedException {
    Thread.sleep(1000);
    return queryService.launchQuery(queryName);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy