https://kotlinlang.org logo
d

davicdsalves

12/16/2016, 6:42 PM
like
Copy code
open class RestTemplateAdapter @Autowired constructor(val retryProperties: RetryProperties,
                               val restTemplate: RestTemplate) {
    private fun createEventNotHandledException(eventDate: LocalDateTime, ex: RestClientException): EventNotHandledException {
        return EventNotHandledException(
                TimeUnit.MINUTES.toMillis(retryProperties.ioerror.backoff),
                eventDate.plusHours(retryProperties.ioerror.expiration),
                ERROR_MSG, ex)
    }
}