Codota Logo
Remote.value
Code IndexAdd Codota 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)

  • Common ways to obtain Remote
private void myMethod () {
Remote r =
  • Codota IconClass klass;klass.getAnnotation(Remote.class)
  • Codota IconClass klass;(Remote) klass.getAnnotation(Remote.class)
  • Smart code suggestions by Codota
}
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

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • orElseThrow (Optional)
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now