public class org.apache.camel.component.saga.SagaProducer extends org.apache.camel.impl.DefaultAsyncProducer
{
private final boolean success;
private org.apache.camel.saga.CamelSagaService camelSagaService;
public void <init>(org.apache.camel.component.saga.SagaEndpoint, boolean)
{
java.lang.IllegalStateException v;
org.apache.camel.CamelContext v, v;
org.apache.camel.component.saga.SagaEndpoint v;
org.apache.camel.component.saga.SagaProducer v;
java.lang.Object v;
boolean v;
v := @this: org.apache.camel.component.saga.SagaProducer;
v := @parameter: org.apache.camel.component.saga.SagaEndpoint;
v := @parameter: boolean;
specialinvoke v.<org.apache.camel.impl.DefaultAsyncProducer: void <init>(org.apache.camel.Endpoint)>(v);
v.<org.apache.camel.component.saga.SagaProducer: boolean success> = v;
v = virtualinvoke v.<org.apache.camel.component.saga.SagaEndpoint: org.apache.camel.CamelContext getCamelContext()>();
v = interfaceinvoke v.<org.apache.camel.CamelContext: java.lang.Object hasService(java.lang.Class)>(class "Lorg/apache/camel/saga/CamelSagaService;");
if v != null goto label;
v = virtualinvoke v.<org.apache.camel.component.saga.SagaEndpoint: org.apache.camel.CamelContext getCamelContext()>();
staticinvoke <org.apache.camel.util.CamelContextHelper: java.lang.Object findByType(org.apache.camel.CamelContext,java.lang.Class)>(v, class "Lorg/apache/camel/saga/CamelSagaService;");
if v != null goto label;
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("Cannot find saga service: saga producers can only be used within a saga");
throw v;
label:
v.<org.apache.camel.component.saga.SagaProducer: org.apache.camel.saga.CamelSagaService camelSagaService> = v;
return;
}
public boolean process(org.apache.camel.Exchange, org.apache.camel.AsyncCallback)
{
java.lang.IllegalStateException v;
org.apache.camel.saga.CamelSagaService v;
org.apache.camel.Message v;
org.apache.camel.component.saga.SagaProducer v;
org.apache.camel.AsyncCallback v;
java.util.concurrent.CompletableFuture v, v, v;
org.apache.camel.Exchange v;
java.util.function.Function v, v;
java.util.function.BiConsumer v;
java.lang.Object v;
v := @this: org.apache.camel.component.saga.SagaProducer;
v := @parameter: org.apache.camel.Exchange;
v := @parameter: org.apache.camel.AsyncCallback;
v = interfaceinvoke v.<org.apache.camel.Exchange: org.apache.camel.Message getIn()>();
v = interfaceinvoke v.<org.apache.camel.Message: java.lang.Object getHeader(java.lang.String,java.lang.Class)>("Long-Running-Action", class "Ljava/lang/String;");
if v != null goto label;
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("Current exchange is not bound to a saga context: cannot complete");
interfaceinvoke v.<org.apache.camel.Exchange: void setException(java.lang.Throwable)>(v);
interfaceinvoke v.<org.apache.camel.AsyncCallback: void done(boolean)>(1);
return 1;
label:
v = v.<org.apache.camel.component.saga.SagaProducer: org.apache.camel.saga.CamelSagaService camelSagaService>;
v = interfaceinvoke v.<org.apache.camel.saga.CamelSagaService: java.util.concurrent.CompletableFuture getSaga(java.lang.String)>(v);
v = staticinvoke <org.apache.camel.component.saga.SagaProducer$lambda_process_0__181: java.util.function.Function bootstrap$(java.lang.String)>(v);
v = virtualinvoke v.<java.util.concurrent.CompletableFuture: java.util.concurrent.CompletableFuture thenApply(java.util.function.Function)>(v);
v = staticinvoke <org.apache.camel.component.saga.SagaProducer$lambda_process_1__182: java.util.function.Function bootstrap$(org.apache.camel.component.saga.SagaProducer)>(v);
v = virtualinvoke v.<java.util.concurrent.CompletableFuture: java.util.concurrent.CompletableFuture thenCompose(java.util.function.Function)>(v);
v = staticinvoke <org.apache.camel.component.saga.SagaProducer$lambda_process_2__183: java.util.function.BiConsumer bootstrap$(org.apache.camel.Exchange,org.apache.camel.AsyncCallback)>(v, v);
virtualinvoke v.<java.util.concurrent.CompletableFuture: java.util.concurrent.CompletableFuture whenComplete(java.util.function.BiConsumer)>(v);
return 0;
}
}