Package org.jboss.errai.bus.server.io

Examples of org.jboss.errai.bus.server.io.ConversationalEndpointCallback


                                // we scan for endpoints
                                for (final Method method : loadClass.getDeclaredMethods()) {
                                    if (method.isAnnotationPresent(Endpoint.class)) {
                                        epts.put(method.getName(), method.getReturnType() == Void.class ?
                                                new EndpointCallback(svc, method) :
                                                new ConversationalEndpointCallback(svc, method, bus));
                                    }
                                }

                                if (!epts.isEmpty()) {
                                    bus.subscribe(loadClass.getSimpleName() + ":RPC", new RemoteServiceCallback(epts));
View Full Code Here


        Object svc = injector.getInstance(type);

        Map<String, MessageCallback> epts = new HashMap<String, MessageCallback>();
        for (final Method method : type.getDeclaredMethods()) {
            if (RebindUtils.isMethodInInterface(remoteIface, method)) {
                epts.put(RebindUtils.createCallSignature(method), new ConversationalEndpointCallback(svc, method, bus));
            }
        }

        bus.subscribe(remoteIface.getName() + ":RPC", new RemoteServiceCallback(epts));
View Full Code Here

                                // we scan for endpoints
                                for (final Method method : loadClass.getDeclaredMethods()) {
                                    if (method.isAnnotationPresent(Endpoint.class)) {
                                        epts.put(method.getName(), method.getReturnType() == Void.class ?
                                                new EndpointCallback(svc, method) :
                                                new ConversationalEndpointCallback(svc, method, bus));
                                    }
                                }

                                if (!epts.isEmpty()) {
                                    bus.subscribe(loadClass.getSimpleName() + ":RPC", new RemoteServiceCallback(epts));
View Full Code Here

    Map<String, MessageCallback> epts = new HashMap<String, MessageCallback>();

    // beware of classloading issues. better reflect on the actual instance
    for (final Method method : remoteIface.getDeclaredMethods()) {
      if (RebindUtils.isMethodInInterface(remoteIface, method)) {
        epts.put(RebindUtils.createCallSignature(method), new ConversationalEndpointCallback(new ServiceInstanceProvider() {
          @SuppressWarnings("unchecked")
          @Override
          public Object get(Message message) {
            if (message.hasPart(CDIProtocol.Qualifiers)) {
              List<String> quals = message.get(List.class, CDIProtocol.Qualifiers);
View Full Code Here

    Map<String, MessageCallback> epts = new HashMap<String, MessageCallback>();

    // beware of classloading issues. better reflect on the actual instance
    for (final Method method : remoteIface.getMethods()) {
      if (RebindUtils.isMethodInInterface(remoteIface, method)) {
        epts.put(RebindUtils.createCallSignature(method), new ConversationalEndpointCallback(
            new ServiceInstanceProvider() {
              @SuppressWarnings("unchecked")
              @Override
              public Object get(Message message) {
                if (message.hasPart(CDIProtocol.Qualifiers)) {
View Full Code Here

    Map<String, MessageCallback> epts = new HashMap<String, MessageCallback>();

    // beware of classloading issues. better reflect on the actual instance
    for (final Method method : remoteIface.getMethods()) {
      if (RebindUtils.isMethodInInterface(remoteIface, method)) {
        epts.put(RebindUtils.createCallSignature(remoteIface, method), new ConversationalEndpointCallback(
                new ServiceInstanceProvider() {
                  @SuppressWarnings("unchecked")
                  @Override
                  public Object get(Message message) {
                    if (message.hasPart(CDIProtocol.Qualifiers)) {
View Full Code Here

    // beware of classloading issues. better reflect on the actual instance
    for (Class<?> intf : type.getInterfaces()) {
      for (final Method method : intf.getDeclaredMethods()) {
        if (RebindUtils.isMethodInInterface(remoteIface, method)) {
          epts.put(RebindUtils.createCallSignature(method), new ConversationalEndpointCallback(new ServiceInstanceProvider() {
            @Override
            public Object get(Message message) {
              if (message.hasPart(CDIProtocol.Qualifiers)) {
                List<String> quals = message.get(List.class, CDIProtocol.Qualifiers);
                Annotation[] qualAnnos = new Annotation[quals.size()];
View Full Code Here

    // beware of classloading issues. better reflect on the actual instance
    for (Class<?> intf : svc.getClass().getInterfaces()) {
      for (final Method method : intf.getMethods()) {
        if (RebindUtils.isMethodInInterface(remoteIface, method)) {
          epts.put(RebindUtils.createCallSignature(intf, method), new ConversationalEndpointCallback(new ServiceInstanceProvider() {
            @Override
            public Object get(Message message) {
              return svc;
            }
          }, method, context.getBus()));
View Full Code Here

        // beware of classloading issues. better reflect on the actual instance
        for (Class<?> intf : svc.getClass().getInterfaces()) {
            for (final Method method : intf.getDeclaredMethods()) {
                if (RebindUtils.isMethodInInterface(remoteIface, method)) {
                    epts.put(RebindUtils.createCallSignature(method),
                            new ConversationalEndpointCallback(svc, method, bus));
                }
            }
        }

        final RemoteServiceCallback delegate = new RemoteServiceCallback(epts);
View Full Code Here

    Map<String, MessageCallback> epts = new HashMap<String, MessageCallback>();

    // beware of classloading issues. better reflect on the actual instance
    for (final Method method : remoteIface.getDeclaredMethods()) {
      if (RebindUtils.isMethodInInterface(remoteIface, method)) {
        epts.put(RebindUtils.createCallSignature(method), new ConversationalEndpointCallback(new ServiceInstanceProvider() {
          @SuppressWarnings("unchecked")
          @Override
          public Object get(Message message) {
            if (message.hasPart(CDIProtocol.Qualifiers)) {
              List<String> quals = message.get(List.class, CDIProtocol.Qualifiers);
View Full Code Here

TOP

Related Classes of org.jboss.errai.bus.server.io.ConversationalEndpointCallback

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.