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

org.distributeme.test.fail.FailableService Maven / Gradle / Ivy

package org.distributeme.test.fail;

import net.anotheria.anoprise.metafactory.Service;

import org.distributeme.annotation.DistributeMe;
import org.distributeme.annotation.FailBy;
import org.distributeme.annotation.Route;
import org.distributeme.core.failing.FailCall;
import org.distributeme.core.failing.Failover;
import org.distributeme.core.failing.FailoverAndReturnInTenSeconds;
import org.distributeme.core.failing.RetryCall;
import org.distributeme.core.failing.RetryCallOnce;
import org.distributeme.core.failing.WaitOneSecondAndRetry;

@DistributeMe
@FailBy(strategyClass=FailCall.class)
public interface FailableService extends Service{

	@FailBy(strategyClass=FailCall.class)
	void failableMethod();
	
	@FailBy(strategyClass=RetryCall.class)
	void retryMethod();
	
	@FailBy(strategyClass=RetryCallOnce.class)
	void retryOnceMethod();
	
	void defaultMethod();

	@FailBy(strategyClass=FailCall.class)
	long failableEcho(long value);
	
	@FailBy(strategyClass=WaitOneSecondAndRetry.class)
	long retryEcho(long value);
	
	@FailBy(strategyClass=RetryCallOnce.class)
	long retryOnceEcho(long value);
	
	@FailBy(strategyClass=Failover.class)
	long failoverEcho(long value);

	@FailBy(strategyClass=Failover.class)
	void failoverPrint(String message);

	@Route(routerClass=Failover.class)
	@FailBy(strategyClass=Failover.class)
	void failoverPrintAndStay(String message);

	@Route(routerClass=FailoverAndReturnInTenSeconds.class)
	@FailBy(strategyClass=FailoverAndReturnInTenSeconds.class)
	void failoverPrintAndStayFoTenSeconds(String message);
}
 




© 2015 - 2025 Weber Informatics LLC | Privacy Policy