Package org.jboss.errai.bus.server.annotations

Examples of org.jboss.errai.bus.server.annotations.Service


    final Set<Class<?>> services = reflections.getTypesAnnotatedWithExcluding(Service.class, CLIENT_PKG_REGEX);

    for (Class<?> loadClass : services) {
      Object svc = null;

      Service svcAnnotation = loadClass.getAnnotation(Service.class);
      if (null == svcAnnotation) {
        // Diagnose Errai-111
        StringBuilder sb = new StringBuilder();
        sb.append("Service annotation cannot be loaded. (See https://jira.jboss.org/browse/ERRAI-111)\n");
        sb.append(loadClass.getSimpleName()).append(" loader: ").append(loadClass.getClassLoader()).append("\n");
        sb.append("@Service loader:").append(Service.class.getClassLoader()).append("\n");
        log.warn(sb.toString());
        continue;
      }

      boolean local = loadClass.isAnnotationPresent(Local.class);

      String svcName = svcAnnotation.value();

      // If no name is specified, just use the class name as the service by default.
      if ("".equals(svcName)) {
        svcName = loadClass.getSimpleName();
      }
View Full Code Here


  private void subscribeServices(final BeanManager beanManager, final MessageBus bus) {
    for (final Map.Entry<AnnotatedType, List<AnnotatedMethod>> entry : managedTypes.getServiceMethods().entrySet()) {
      final Class<?> type = entry.getKey().getJavaClass();

      for (final AnnotatedMethod method : entry.getValue()) {
        final Service svc = method.getAnnotation(Service.class);
        final String svcName = svc.value().equals("") ? method.getJavaMember().getName() : svc.value();

        final Method callMethod = method.getJavaMember();

        bus.subscribe(svcName, new MessageCallback() {
View Full Code Here

  private void subscribeServices(final BeanManager beanManager, final MessageBus bus) {
    for (final Map.Entry<AnnotatedType, List<AnnotatedMethod>> entry : managedTypes.getServiceMethods().entrySet()) {
      final Class<?> type = entry.getKey().getJavaClass();

      for (final AnnotatedMethod method : entry.getValue()) {
        final Service svc = method.getAnnotation(Service.class);
        final String svcName = svc.value().equals("") ? method.getJavaMember().getName() : svc.value();

        final Method callMethod = method.getJavaMember();

        bus.subscribe(svcName, new MessageCallback() {
View Full Code Here

  private void subscribeServices(final BeanManager beanManager, final MessageBus bus) {
    for (final Map.Entry<AnnotatedType, List<AnnotatedMethod>> entry : managedTypes.getServiceMethods().entrySet()) {
      final Class<?> type = entry.getKey().getJavaClass();

      for (final AnnotatedMethod method : entry.getValue()) {
        final Service svc = method.getAnnotation(Service.class);
        final String svcName = svc.value().equals("") ? method.getJavaMember().getName() : svc.value();

        final Method callMethod = method.getJavaMember();

        bus.subscribe(svcName, new MessageCallback() {
View Full Code Here

  private void subscribeServices(final BeanManager beanManager, final MessageBus bus) {
    for (final Map.Entry<AnnotatedType, List<AnnotatedMethod>> entry : managedTypes.getServiceMethods().entrySet()) {
      final Class<?> type = entry.getKey().getJavaClass();

      for (final AnnotatedMethod method : entry.getValue()) {
        final Service svc = method.getAnnotation(Service.class);
        final String svcName = svc.value().equals("") ? method.getJavaMember().getName() : svc.value();

        final Method callMethod = method.getJavaMember();

        bus.subscribe(svcName, new MessageCallback() {
View Full Code Here

    final Set<Class<?>> services = reflections.getTypesAnnotatedWithExcluding(Service.class, CLIENT_PKG_REGEX);

    for (Class<?> loadClass : services) {
      Object svc = null;

      Service svcAnnotation = loadClass.getAnnotation(Service.class);
      if (null == svcAnnotation) {
        // Diagnose Errai-111
        StringBuffer sb = new StringBuffer();
        sb.append("Service annotation cannot be loaded. (See https://jira.jboss.org/browse/ERRAI-111)\n");
        sb.append(loadClass.getSimpleName()).append(" loader: ").append(loadClass.getClassLoader()).append("\n");
        sb.append("@Service loader:").append(Service.class.getClassLoader()).append("\n");
        log.warn(sb.toString());
        continue;
      }

      boolean local = loadClass.isAnnotationPresent(Local.class);

      String svcName = svcAnnotation.value();

      // If no name is specified, just use the class name as the service by default.
      if ("".equals(svcName)) {
        svcName = loadClass.getSimpleName();
      }
View Full Code Here

    for (Map.Entry<AnnotatedType, List<AnnotatedMethod>> entry : managedTypes.getServiceMethods().entrySet()) {
      final Class<?> type = entry.getKey().getJavaClass();

      for (final AnnotatedMethod method : entry.getValue()) {
        Service svc = method.getAnnotation(Service.class);
        String svcName = svc.value().equals("") ? method.getJavaMember().getName() : svc.value();

        final Method callMethod = method.getJavaMember();

        bus.subscribe(svcName, new MessageCallback() {
View Full Code Here

        final Set<Class<?>> services = reflections.getTypesAnnotatedWithExcluding(Service.class, MetaDataScanner.CLIENT_PKG_REGEX);

        for (Class<?> loadClass : services) {
            Object svc = null;

            Service svcAnnotation = loadClass.getAnnotation(Service.class);
            if(null==svcAnnotation)
            {
                // Diagnose Errai-111
                StringBuffer sb = new StringBuffer();
                sb.append("Service annotation cannot be loaded. (See https://jira.jboss.org/browse/ERRAI-111)\n");
                sb.append(loadClass.getSimpleName()).append(" loader: ").append(loadClass.getClassLoader()).append("\n");
                sb.append("@Service loader:").append(Service.class.getClassLoader()).append("\n");
                log.warn(sb.toString());
                continue;
            }
           
            String svcName = svcAnnotation.value();

            // If no name is specified, just use the class name as the service by default.
            if ("".equals(svcName)) {
                svcName = loadClass.getSimpleName();
            }
View Full Code Here

    final Set<Class<?>> services = reflections.getTypesAnnotatedWithExcluding(Service.class, CLIENT_PKG_REGEX);

    for (Class<?> loadClass : services) {
      Object svc = null;

      Service svcAnnotation = loadClass.getAnnotation(Service.class);
      if (null == svcAnnotation) {
        // Diagnose Errai-111
        StringBuffer sb = new StringBuffer();
        sb.append("Service annotation cannot be loaded. (See https://jira.jboss.org/browse/ERRAI-111)\n");
        sb.append(loadClass.getSimpleName()).append(" loader: ").append(loadClass.getClassLoader()).append("\n");
        sb.append("@Service loader:").append(Service.class.getClassLoader()).append("\n");
        log.warn(sb.toString());
        continue;
      }

      boolean local = loadClass.isAnnotationPresent(Local.class);

      String svcName = svcAnnotation.value();

      // If no name is specified, just use the class name as the service by default.
      if ("".equals(svcName)) {
        svcName = loadClass.getSimpleName();
      }
View Full Code Here

    final Set<Class<?>> services = reflections.getTypesAnnotatedWithExcluding(Service.class, MetaDataScanner.CLIENT_PKG_REGEX);

    for (Class<?> loadClass : services) {
      Object svc = null;

      Service svcAnnotation = loadClass.getAnnotation(Service.class);
      if (null == svcAnnotation) {
        // Diagnose Errai-111
        StringBuffer sb = new StringBuffer();
        sb.append("Service annotation cannot be loaded. (See https://jira.jboss.org/browse/ERRAI-111)\n");
        sb.append(loadClass.getSimpleName()).append(" loader: ").append(loadClass.getClassLoader()).append("\n");
        sb.append("@Service loader:").append(Service.class.getClassLoader()).append("\n");
        log.warn(sb.toString());
        continue;
      }

      boolean local = loadClass.isAnnotationPresent(Local.class);

      String svcName = svcAnnotation.value();

      // If no name is specified, just use the class name as the service by default.
      if ("".equals(svcName)) {
        svcName = loadClass.getSimpleName();
      }
View Full Code Here

TOP

Related Classes of org.jboss.errai.bus.server.annotations.Service

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.