
com.oneandone.ejbcdiunit.internal.AsynchronousMethodInterceptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ejb-cdi-unit Show documentation
Show all versions of ejb-cdi-unit Show documentation
A module that can be used together with cdiunit to build en ejb-test-environment.
The newest version!
package com.oneandone.ejbcdiunit.internal;
import java.lang.reflect.Method;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import javax.ejb.Asynchronous;
import javax.inject.Inject;
import javax.interceptor.AroundInvoke;
import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.oneandone.ejbcdiunit.AsynchronousManager;
/**
* Used to simulate Asynchronous calls.
*
* @author aschoerk
*/
@Interceptor
@EjbAsynchronous
public class AsynchronousMethodInterceptor {
@Inject
AsynchronousManager asynchronousManager;
Logger logger = LoggerFactory.getLogger("AsynchronousMethodInterceptor");
/**
* Used by Asynchronous Simulation to create a changeable Result-Future
*/
public final class InterceptedAsyncResult implements Future
© 2015 - 2025 Weber Informatics LLC | Privacy Policy