congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
Remote.value
Code IndexAdd Tabnine to your IDE (free)

How to use
value
method
in
javax.ejb.Remote

Best Java code snippets using javax.ejb.Remote.value (Showing top 20 results out of 315)

origin: jersey/jersey

private List<Class> remoteAndLocalIfaces(final Class<?> resourceClass) {
  final List<Class> allLocalOrRemoteIfaces = new LinkedList<>();
  if (resourceClass.isAnnotationPresent(Remote.class)) {
    allLocalOrRemoteIfaces.addAll(Arrays.asList(resourceClass.getAnnotation(Remote.class).value()));
  }
  if (resourceClass.isAnnotationPresent(Local.class)) {
    allLocalOrRemoteIfaces.addAll(Arrays.asList(resourceClass.getAnnotation(Local.class).value()));
  }
  for (Class<?> i : resourceClass.getInterfaces()) {
    if (i.isAnnotationPresent(Remote.class) || i.isAnnotationPresent(Local.class)) {
      allLocalOrRemoteIfaces.add(i);
    }
  }
  return allLocalOrRemoteIfaces;
}
origin: wildfly/wildfly

private Collection<Class<?>> getRemoteBusinessInterfaces(final DeploymentUnit deploymentUnit, final Class<?> sessionBeanClass) throws DeploymentUnitProcessingException {
  final Remote remoteViewAnnotation = sessionBeanClass.getAnnotation(Remote.class);
  if (remoteViewAnnotation == null) {
    Collection<Class<?>> interfaces = getBusinessInterfacesFromInterfaceAnnotations(sessionBeanClass, Remote.class);
    if (!interfaces.isEmpty()) {
      return interfaces;
    }
    return Collections.emptySet();
  }
  Class<?>[] remoteViews = remoteViewAnnotation.value();
  if (remoteViews == null || remoteViews.length == 0) {
    Set<Class<?>> interfaces = getPotentialBusinessInterfaces(sessionBeanClass);
    // For version < 3.2, the EJB spec didn't allow more than one implementing interfaces to be considered as remote when the bean class had the @Remote annotation without any explicit value.
    // EJB 3.2 allows it (core spec, section 4.9.7)
    if (interfaces.size() != 1 && !isEjbVersionGreaterThanOrEqualTo32(deploymentUnit)) {
      throw EjbLogger.ROOT_LOGGER.beanWithRemoteAnnotationImplementsMoreThanOneInterface(sessionBeanClass);
    }
    return interfaces;
  }
  return Arrays.asList(remoteViews);
}
origin: stagemonitor/stagemonitor

  @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;
  }
}
origin: com.sun.jersey/jersey-servlet

private List<Class> remoteAndLocalIfaces(final Class<?> resourceClass) {
  final List<Class> allLocalOrRemoteIfaces = new LinkedList<Class>();
  if (resourceClass.isAnnotationPresent(Remote.class)) {
    allLocalOrRemoteIfaces.addAll(Arrays.asList(resourceClass.getAnnotation(Remote.class).value()));
  }
  if (resourceClass.isAnnotationPresent(Local.class)) {
    allLocalOrRemoteIfaces.addAll(Arrays.asList(resourceClass.getAnnotation(Local.class).value()));
  }
  for (Class<?> i : resourceClass.getInterfaces()) {
    if (i.isAnnotationPresent(Remote.class) || i.isAnnotationPresent(Local.class)) {
      allLocalOrRemoteIfaces.add(i);
    }
  }
  return allLocalOrRemoteIfaces;
}
origin: com.sun.jersey/jersey-bundle

private List<Class> remoteAndLocalIfaces(final Class<?> resourceClass) {
  final List<Class> allLocalOrRemoteIfaces = new LinkedList<Class>();
  if (resourceClass.isAnnotationPresent(Remote.class)) {
    allLocalOrRemoteIfaces.addAll(Arrays.asList(resourceClass.getAnnotation(Remote.class).value()));
  }
  if (resourceClass.isAnnotationPresent(Local.class)) {
    allLocalOrRemoteIfaces.addAll(Arrays.asList(resourceClass.getAnnotation(Local.class).value()));
  }
  for (Class<?> i : resourceClass.getInterfaces()) {
    if (i.isAnnotationPresent(Remote.class) || i.isAnnotationPresent(Local.class)) {
      allLocalOrRemoteIfaces.add(i);
    }
  }
  return allLocalOrRemoteIfaces;
}
origin: jersey/jersey-1.x

private List<Class> remoteAndLocalIfaces(final Class<?> resourceClass) {
  final List<Class> allLocalOrRemoteIfaces = new LinkedList<Class>();
  if (resourceClass.isAnnotationPresent(Remote.class)) {
    allLocalOrRemoteIfaces.addAll(Arrays.asList(resourceClass.getAnnotation(Remote.class).value()));
  }
  if (resourceClass.isAnnotationPresent(Local.class)) {
    allLocalOrRemoteIfaces.addAll(Arrays.asList(resourceClass.getAnnotation(Local.class).value()));
  }
  for (Class<?> i : resourceClass.getInterfaces()) {
    if (i.isAnnotationPresent(Remote.class) || i.isAnnotationPresent(Local.class)) {
      allLocalOrRemoteIfaces.add(i);
    }
  }
  return allLocalOrRemoteIfaces;
}
origin: org.seasar.container/s2-tiger

/**
 * {@link Remote}アノテーションで指定されたビジネスインターフェースを検出します。
 */
protected void detectRemoteBusinessInterfaces() {
  final Remote remote = beanClass.getAnnotation(Remote.class);
  if (remote != null) {
    for (final Class<?> type : remote.value()) {
      if (isBusinessInterface(type)) {
        businessInterfaces.add(type);
      }
    }
  }
  for (final Class<?> type : beanClass.getInterfaces()) {
    final Remote annotation = type.getAnnotation(Remote.class);
    if (annotation != null) {
      businessInterfaces.add(type);
    }
  }
}
origin: org.glassfish.tyrus/tyrus-container-glassfish-ejb

@Override
public Method getInvocableMethod(Method method) {
  final Class<?> declaringClass = method.getDeclaringClass();
  final List<Class> interfaces = new LinkedList<Class>();
  if (declaringClass.isAnnotationPresent(Remote.class)) {
    interfaces.addAll(Arrays.asList(declaringClass.getAnnotation(Remote.class).value()));
  }
  if (declaringClass.isAnnotationPresent(Local.class)) {
    interfaces.addAll(Arrays.asList(declaringClass.getAnnotation(Local.class).value()));
  }
  for (Class<?> i : declaringClass.getInterfaces()) {
    if (i.isAnnotationPresent(Remote.class) || i.isAnnotationPresent(Local.class)) {
      interfaces.add(i);
    }
  }
  for (Class iface : interfaces) {
    try {
      final Method interfaceMethod = iface.getDeclaredMethod(method.getName(), method.getParameterTypes());
      if (interfaceMethod != null) {
        return interfaceMethod;
      }
    } catch (Exception e) {
      LOGGER.log(Level.WARNING, e.getMessage(), e);
    }
  }
  return method;
}
origin: eclipse-ee4j/tyrus

@Override
public Method getInvocableMethod(Method method) {
  final Class<?> declaringClass = method.getDeclaringClass();
  final List<Class> interfaces = new LinkedList<Class>();
  if (declaringClass.isAnnotationPresent(Remote.class)) {
    interfaces.addAll(Arrays.asList(declaringClass.getAnnotation(Remote.class).value()));
  }
  if (declaringClass.isAnnotationPresent(Local.class)) {
    interfaces.addAll(Arrays.asList(declaringClass.getAnnotation(Local.class).value()));
  }
  for (Class<?> i : declaringClass.getInterfaces()) {
    if (i.isAnnotationPresent(Remote.class) || i.isAnnotationPresent(Local.class)) {
      interfaces.add(i);
    }
  }
  for (Class iface : interfaces) {
    try {
      final Method interfaceMethod = iface.getDeclaredMethod(method.getName(), method.getParameterTypes());
      if (interfaceMethod != null) {
        return interfaceMethod;
      }
    } catch (Exception e) {
      LOGGER.log(Level.WARNING, e.getMessage(), e);
    }
  }
  return method;
}
origin: org.jboss.as/jboss-as-ejb3

private Collection<Class<?>> getRemoteBusinessInterfaces(Class<?> sessionBeanClass) throws DeploymentUnitProcessingException {
  final Remote remoteViewAnnotation = sessionBeanClass.getAnnotation(Remote.class);
  if (remoteViewAnnotation == null) {
    Collection<Class<?>> interfaces = getBusinessInterfacesFromInterfaceAnnotations(sessionBeanClass, Remote.class);
    if (!interfaces.isEmpty()) {
      return interfaces;
    }
    return Collections.emptySet();
  }
  Class<?>[] remoteViews = remoteViewAnnotation.value();
  if (remoteViews == null || remoteViews.length == 0) {
    Set<Class<?>> interfaces = getPotentialBusinessInterfaces(sessionBeanClass);
    if (interfaces.size() != 1)
      throw MESSAGES.beanWithRemoteAnnotationImplementsMoreThanOneInterface(sessionBeanClass);
    return interfaces;
  }
  return Arrays.asList(remoteViews);
}
origin: org.jboss/jboss-metadata

  public void process(SessionBeanMetaData metaData, Class<?> type)
  {
   Remote remote = finder.getAnnotation(type, Remote.class);
   if(remote == null)
     return;
   
   if(type.isInterface())
   {
     addBusinessInterface(metaData, type);
   }
   else
   {
     if(remote.value() == null || remote.value().length == 0)
     {
      Class<?> businessInterface = ClassHelper.getDefaultInterface(type);
      addBusinessInterface(metaData, businessInterface);
     }
     else
     {
      for(Class<?> businessInterface : remote.value())
      {
        addBusinessInterface(metaData, businessInterface);
      }
     }
   }
  }
}
origin: org.jboss.ws/jbossws-jboss510-metadata

public void process(SessionBeanMetaData metaData, Class<?> type)
{
 Remote remote = finder.getAnnotation(type, Remote.class);
 if(remote == null)
   return;
 
 if(type.isInterface())
 {
   addBusinessInterface(metaData, type);
 }
 else
 {
   if(remote.value() == null || remote.value().length == 0)
   {
    Class<?> businessInterface = ClassHelper.getDefaultInterface(type);
    addBusinessInterface(metaData, businessInterface);
   }
   else
   {
    for(Class<?> businessInterface : remote.value())
    {
      addBusinessInterface(metaData, businessInterface);
    }
   }
 }
}
origin: org.jboss.ws/jbossws-jboss510-metadata

public void process(JBossSessionBeanMetaData metaData, Class<?> type)
{
 Remote remote = finder.getAnnotation(type, Remote.class);
 if(remote == null)
   return;
 
 if(type.isInterface())
 {
   addBusinessInterface(metaData, type);
 }
 else
 {
   if(remote.value() == null || remote.value().length == 0)
   {
    Class<?> businessInterface = ClassHelper.getDefaultInterface(type);
    addBusinessInterface(metaData, businessInterface);
   }
   else
   {
    for(Class<?> businessInterface : remote.value())
    {
      addBusinessInterface(metaData, businessInterface);
    }
   }
 }
}

origin: com.caucho/resin

return remote.value()[0];
origin: org.graniteds/granite-server-ejb

for (Class<?> i : clazz.getAnnotation(Remote.class).value())
  scannedClasses.put(i, clazz);
origin: org.jboss.ejb3/jboss-ejb3-core

if (remoteAnnotation != null)
  Class[] remotes = remoteAnnotation.value();
  for (int i = 0; i < remotes.length; ++i)
origin: org.jboss.weld.arquillian.container/arquillian-weld-ee-embedded-1.1

if (remoteAnnotation != null)
  for (final Class<?> clazz : remoteAnnotation.value())
origin: org.jboss.arquillian.container/arquillian-weld-ee-embedded-1.1

if (remoteAnnotation != null)
  for (final Class<?> clazz : remoteAnnotation.value())
origin: org.jboss.ejb3/jboss-ejb3-core

for (Class<?> remoteClass : remote.value())
origin: org.stagemonitor/stagemonitor-requestmonitor

  @Override
  public boolean matches(MethodDescription.InDefinedShape targetMethod) {
    final AnnotationList declaredAnnotationsOfType = targetMethod.getDeclaringType().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;
  }
}
javax.ejbRemotevalue

Popular methods of Remote

  • <init>

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now