當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。