当前位置: 首页>>代码示例>>Java>>正文


Java Remote类代码示例

本文整理汇总了Java中javax.ejb.Remote的典型用法代码示例。如果您正苦于以下问题:Java Remote类的具体用法?Java Remote怎么用?Java Remote使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Remote类属于javax.ejb包,在下文中一共展示了Remote类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import javax.ejb.Remote; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    mapping = new HashMap<Class<?>, List<Class<?>>>();
    classes = new ArrayList<Class<?>>();
    excludes = new ArrayList<String>();
    // do not check the APP beans
    excludes.add("org.oscm.app.");
    String directory = "..";
    findAnnotatedStatelessBeans(new File(directory), "org.oscm.",
            Remote.class, classes, mapping);
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:12,代码来源:InvocationDateContainerTest.java

示例2: EjbDescriptorImpl

import javax.ejb.Remote; //导入依赖的package包/类
public EjbDescriptorImpl(final Class<T> clazz) {
    LOG.trace("Creating EJB descriptor for {}", clazz);
    this.clazz = clazz;
    localBusinessInterfaces = new HashSet<>();
    remoteBusinessInterfaces = new HashSet<>();
    localBusinessInterfaces.add((BusinessInterfaceDescriptor) () -> clazz);
    stream(clazz.getInterfaces()).forEach(iface -> {
        if (iface.getAnnotation(Remote.class) != null) {
            remoteBusinessInterfaces.add((BusinessInterfaceDescriptor) () -> iface);
        } else {
            localBusinessInterfaces.add((BusinessInterfaceDescriptor) () -> iface);
        }
    });
}
 
开发者ID:dajudge,项目名称:testee.fi,代码行数:15,代码来源:EjbDescriptorImpl.java

示例3: considerInterface

import javax.ejb.Remote; //导入依赖的package包/类
private boolean considerInterface(Class<?> i) {
    if (i.getAnnotation(Local.class) != null) {
        return true;
    } else if (i.getAnnotation(Remote.class) != null) {
        return true;
    } else {
        return isExcplicitlyRequiredClass(i);
    }
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:10,代码来源:InterfaceMap.java

示例4: ejbInterfaces

import javax.ejb.Remote; //导入依赖的package包/类
/**
 * Retrieves interface classes from passed {@link Local} or {@link Remote}
 * annotation
 *
 * @param annotation
 * @return {@link Class}[] array of interface classes
 */
private Class<?>[] ejbInterfaces(Annotation annotation) {

    Class<?>[] interfaces;

    if (annotation instanceof Remote) {
        interfaces = ObjectUtils.cast(annotation, Remote.class).value();
    } else if (annotation instanceof Local) {
        interfaces = ObjectUtils.cast(annotation, Local.class).value();
    } else {
        interfaces = null;
    }

    return interfaces;
}
 
开发者ID:levants,项目名称:lightmare,代码行数:22,代码来源:BeanDeployer.java

示例5: initInterfaces

import javax.ejb.Remote; //导入依赖的package包/类
/**
 * Identifies and caches EJB bean's {@link Local} and / or {@link Remote}
 * annotated interfaces
 *
 * @param beanClass
 */
private void initInterfaces(Class<?> beanClass, Class<? extends Annotation> type) {

    Class<?>[] interfaces = null;
    Set<Class<?>> interfacesSet = new HashSet<Class<?>>();
    Annotation ejbAnnotation = beanClass.getAnnotation(type);
    Class<?>[] ejbInterfaces = beanClass.getInterfaces();

    if (ObjectUtils.notNull(ejbAnnotation)) {
        interfaces = ejbInterfaces(ejbAnnotation);
        if (CollectionUtils.valid(interfaces)) {
            interfacesSet.addAll(Arrays.asList(interfaces));
        }
    }

    for (Class<?> interfaceClass : ejbInterfaces) {
        if (interfaceClass.isAnnotationPresent(type))
            interfacesSet.add(interfaceClass);
    }

    if (CollectionUtils.valid(interfacesSet)) {
        interfaces = toArray(interfacesSet);
        if (ejbAnnotation instanceof Local) {
            metaData.setRemoteInterfaces(interfaces);
        } else if (ejbAnnotation instanceof Remote) {
            metaData.setRemoteInterfaces(interfaces);
        }
    }
}
 
开发者ID:levants,项目名称:lightmare,代码行数:35,代码来源:BeanDeployer.java

示例6: matches

import javax.ejb.Remote; //导入依赖的package包/类
@Override
public boolean matches(MethodDescription targetMethod) {
	final AnnotationList declaredAnnotationsOfType = targetMethod.getDeclaringType().asErasure().getDeclaredAnnotations();
	if (declaredAnnotationsOfType.isAnnotationPresent(Remote.class)) {
		final Class[] remoteInterfaces = declaredAnnotationsOfType.ofType(Remote.class).loadSilent().value();
		if (!new TypeList.ForLoadedTypes(remoteInterfaces).filter(isDeclaredInInterfaceHierarchy(targetMethod)).isEmpty()) {
			return true;
		}
	}
	return false;
}
 
开发者ID:stagemonitor,项目名称:stagemonitor,代码行数:12,代码来源:IsDeclaredInRemoteClassElementMatcher.java

示例7: isNeglectableClass

import javax.ejb.Remote; //导入依赖的package包/类
@Override
public boolean isNeglectableClass(Class<?> clazz) {
    return (clazz.getAnnotation(Remote.class) == null);
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:5,代码来源:WebMethodNamesTest.java

示例8: invokeInvocationDateInterceptor

import javax.ejb.Remote; //导入依赖的package包/类
private void invokeInvocationDateInterceptor(Method method) {
    if (method.getDeclaringClass().getAnnotation(Remote.class) != null) {
        DateFactory.getInstance().takeCurrentTime();
    }
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:6,代码来源:DeployedSessionBean.java

示例9: getRemotes

import javax.ejb.Remote; //导入依赖的package包/类
@Override
public List< com.comcast.cats.keymanager.domain.Remote > getRemotes()
{
    return keyManager.getRemotes();
}
 
开发者ID:Comcast,项目名称:cats,代码行数:6,代码来源:IRServiceWSImpl.java

示例10: remotes

import javax.ejb.Remote; //导入依赖的package包/类
@GET
   @Path(KeyManagerConstants.REMOTES_PATH)
   @Produces("application/xml")
public List<com.comcast.cats.keymanager.domain.Remote> remotes();
 
开发者ID:Comcast,项目名称:cats,代码行数:5,代码来源:KeyManagerProxy.java

示例11: getNarrowTypesMatcher

import javax.ejb.Remote; //导入依赖的package包/类
@Override
protected ElementMatcher.Junction<TypeDescription> getNarrowTypesMatcher() {
	return isAnnotatedWith(Remote.class).or(implementsInterfaceWhichIsAnnotatedWithRemote());
}
 
开发者ID:stagemonitor,项目名称:stagemonitor,代码行数:5,代码来源:RemoteEjbMonitorTransformer.java

示例12: matches

import javax.ejb.Remote; //导入依赖的package包/类
@Override
public boolean matches(TypeDescription target) {
	return !target.getInterfaces().asErasures().filter(isAnnotatedWith(Remote.class)).isEmpty();
}
 
开发者ID:stagemonitor,项目名称:stagemonitor,代码行数:5,代码来源:RemoteInterfaceElementMatcher.java

示例13: matches

import javax.ejb.Remote; //导入依赖的package包/类
@Override
public boolean matches(MethodDescription target) {
	return target.getDeclaringType().getInterfaces().asErasures()
			.filter(isAnnotatedWith(Remote.class))
			.filter(isDeclaredInInterfaceHierarchy(target)).size() > 0;
}
 
开发者ID:stagemonitor,项目名称:stagemonitor,代码行数:7,代码来源:RemoteInterfaceMethodMatcher.java

示例14: isValidInterface

import javax.ejb.Remote; //导入依赖的package包/类
private boolean isValidInterface(final RemoteBean b, final Class clazz, final Class beanClass, final String tag) {

        if (clazz.equals(beanClass)) {

            fail(b, "xml." + tag + ".beanClass", clazz.getName());

        } else if (!clazz.isInterface()) {

            fail(b, "xml." + tag + ".notInterface", clazz.getName());

        } else if (EJBHome.class.isAssignableFrom(clazz)) {

            if (tag.equals("home")) {
                return true;
            }

            fail(b, "xml." + tag + ".ejbHome", clazz.getName());

        } else if (EJBLocalHome.class.isAssignableFrom(clazz)) {

            if (tag.equals("localHome")) {
                return true;
            }

            fail(b, "xml." + tag + ".ejbLocalHome", clazz.getName());

        } else if (EJBObject.class.isAssignableFrom(clazz)) {

            if (tag.equals("remote")) {
                return true;
            }

            fail(b, "xml." + tag + ".ejbObject", clazz.getName());

        } else if (EJBLocalObject.class.isAssignableFrom(clazz)) {

            if (tag.equals("local")) {
                return true;
            }

            fail(b, "xml." + tag + ".ejbLocalObject", clazz.getName());

        } else {
            if (tag.equals("businessLocal") || tag.equals("businessRemote")) {

                return true;

            } else if (clazz.isAnnotationPresent(Local.class)) {

                fail(b, "xml." + tag + ".businessLocal", clazz.getName());

            } else if (clazz.isAnnotationPresent(Remote.class)) {

                fail(b, "xml." + tag + ".businessRemote", clazz.getName());

            } else {

                fail(b, "xml." + tag + ".unknown", clazz.getName());

            }

        }

        // must be tagged as <home>, <local-home>, <remote>, or <local>

        return false;
    }
 
开发者ID:apache,项目名称:tomee,代码行数:68,代码来源:CheckClasses.java

示例15: indentifyInterfaces

import javax.ejb.Remote; //导入依赖的package包/类
/**
 * Identifies and caches EJB bean interfaces
 *
 * @param beanClass
 */
private void indentifyInterfaces(Class<?> beanClass) {
    initInterfaces(beanClass, Local.class);
    initInterfaces(beanClass, Remote.class);
}
 
开发者ID:levants,项目名称:lightmare,代码行数:10,代码来源:BeanDeployer.java


注:本文中的javax.ejb.Remote类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。