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

io.elastic.sailor.impl.ErrorCallback Maven / Gradle / Ivy

There is a newer version: 4.0.3
Show newest version
package io.elastic.sailor.impl;

import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
import io.elastic.sailor.AmqpService;
import io.elastic.sailor.ExecutionContext;

public class ErrorCallback extends CountingCallbackImpl {

    private ExecutionContext executionContext;
    private AmqpService amqp;
    private CryptoServiceImpl cipher;

    @Inject
    public ErrorCallback(
            @Assisted ExecutionContext executionContext,
            AmqpService amqp,
            CryptoServiceImpl cipher) {
        this.executionContext = executionContext;
        this.amqp = amqp;
        this.cipher = cipher;
    }

    @Override
    public void receiveData(Object data) {
        amqp.sendError((Throwable) data, executionContext.buildAmqpProperties(), executionContext.getMessage());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy