Examples of ChannelService


Examples of com.google.appengine.api.channel.ChannelService

      BufferedReader reader = req.getReader();
      while ((line = reader.readLine()) != null)
        jb.append(line);
    } catch (Exception e) { /*report an error*/ }

    ChannelService channelService = ChannelServiceFactory.getChannelService();
    channelService.sendMessage( new ChannelMessage(path, jb.toString() ) );
    resp.setContentType("text/plain");
    resp.getWriter().write("sent\n");

 
View Full Code Here

Examples of com.google.appengine.api.channel.ChannelService

public class PresenceServlet extends HttpServlet {
    Logger log = Logger.getLogger(PresenceServlet.class.getName());

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        ChannelService channelService = ChannelServiceFactory.getChannelService();
        ChannelPresence presence = channelService.parsePresence(req);
        log.info(presence.clientId() + ":" + presence.isConnected());
    }
View Full Code Here

Examples of org.jboss.as.clustering.jgroups.subsystem.ChannelService

            // AS7-1751 decouple channel service name (name) and name used to create channel id (cluster)
            ServiceName channelServiceName = ChannelService.getServiceName(name);
            configBuilder.addDependency(channelServiceName, Channel.class, transportConfig.getChannelInjector());

            InjectedValue<ChannelFactory> channelFactory = new InjectedValue<ChannelFactory>();
            ServiceBuilder<Channel> channelBuilder = target.addService(channelServiceName, new ChannelService(cluster, channelFactory))
                    .addDependency(ChannelFactoryService.getServiceName(stack), ChannelFactory.class, channelFactory)
                    .setInitialMode(ServiceController.Mode.ON_DEMAND)
            ;
            newControllers.add(channelBuilder.install());
        }
View Full Code Here

Examples of org.jboss.as.clustering.jgroups.subsystem.ChannelService

        newControllers.add(containerBuilder.install());

        InjectedValue<ChannelFactory> channelFactory = new InjectedValue<ChannelFactory>();
        // Set initial mode to NEVER - Cache add operations will update mode to ON_DEMAND when necessary
        ServiceBuilder<Channel> channelBuilder = target.addService(channelServiceName, new ChannelService(name, channelFactory))
            .addAliases(EmbeddedCacheManagerService.getTransportServiceName(name))
            .addDependency(ChannelFactoryService.getServiceName(stack), ChannelFactory.class, channelFactory)
            .setInitialMode(ServiceController.Mode.NEVER)
        ;
        newControllers.add(channelBuilder.install());
View Full Code Here

Examples of org.jboss.as.clustering.jgroups.subsystem.ChannelService

    ServiceController<?> installChannelService(ServiceTarget target, String containerName, String cluster, String stack, ServiceVerificationHandler verificationHandler) {

        ServiceName channelServiceName = ChannelService.getServiceName(containerName);

        InjectedValue<ChannelFactory> channelFactory = new InjectedValue<ChannelFactory>();
        return target.addService(channelServiceName, new ChannelService(cluster, channelFactory))
                .addDependency(ChannelFactoryService.getServiceName(stack), ChannelFactory.class, channelFactory)
                .setInitialMode(ServiceController.Mode.ON_DEMAND)
                .install()
        ;
    }
View Full Code Here

Examples of org.jboss.as.clustering.jgroups.subsystem.ChannelService

    }

    ServiceController<?> installChannelService(ServiceTarget target, String containerName, String cluster, String stack, ServiceVerificationHandler verificationHandler) {

        final InjectedValue<ChannelFactory> channelFactory = new InjectedValue<ChannelFactory>();
        return AsynchronousService.addService(target, ChannelService.getServiceName(containerName), new ChannelService(cluster, channelFactory))
                .addDependency(ChannelFactoryService.getServiceName(stack), ChannelFactory.class, channelFactory)
                .setInitialMode(ServiceController.Mode.ON_DEMAND)
                .install()
        ;
    }
View Full Code Here

Examples of org.jboss.as.clustering.jgroups.subsystem.ChannelService

    }

    ServiceController<?> installChannelService(ServiceTarget target, String containerName, String cluster, String stack, ServiceVerificationHandler verificationHandler) {

        final InjectedValue<ChannelFactory> channelFactory = new InjectedValue<ChannelFactory>();
        return target.addService(ChannelService.getServiceName(containerName), new ChannelService(cluster, channelFactory))
                .addDependency(ChannelFactoryService.getServiceName(stack), ChannelFactory.class, channelFactory)
                .setInitialMode(ServiceController.Mode.ON_DEMAND)
                .install()
        ;
    }
View Full Code Here

Examples of org.jboss.as.clustering.jgroups.subsystem.ChannelService

            }
            builder.addDependency(ChannelService.getServiceName(name), Channel.class, transportConfig.getChannelInjector());
            config.setTransport(transportConfig);

            InjectedValue<ChannelFactory> channelFactory = new InjectedValue<ChannelFactory>();
            newControllers.add(target.addService(ChannelService.getServiceName(name), new ChannelService(name, channelFactory))
                    .addDependency(ChannelFactoryService.getServiceName(stack), ChannelFactory.class, channelFactory)
                    .setInitialMode(ServiceController.Mode.ON_DEMAND)
                    .install());
        }
View Full Code Here

Examples of org.jboss.as.clustering.jgroups.subsystem.ChannelService

            ServiceName channelServiceName = ChannelService.getServiceName(name);
            containerBuilder.addDependency(channelServiceName, Channel.class, transportConfig.getChannelInjector());

            InjectedValue<ChannelFactory> channelFactory = new InjectedValue<ChannelFactory>();
            ServiceBuilder<Channel> channelBuilder = target.addService(channelServiceName, new ChannelService(name, channelFactory))
                    .addDependency(ChannelFactoryService.getServiceName(stack), ChannelFactory.class, channelFactory)
                    .setInitialMode(ServiceController.Mode.ON_DEMAND)
            ;
            newControllers.add(channelBuilder.install());
        }
View Full Code Here

Examples of org.jboss.as.clustering.jgroups.subsystem.ChannelService

    }

    ServiceController<?> installChannelService(ServiceTarget target, String containerName, String cluster, String stack, ServiceVerificationHandler verificationHandler) {

        final InjectedValue<ChannelFactory> channelFactory = new InjectedValue<ChannelFactory>();
        return AsynchronousService.addService(target, ChannelService.getServiceName(containerName), new ChannelService(cluster, channelFactory))
                .addDependency(ChannelFactoryService.getServiceName(stack), ChannelFactory.class, channelFactory)
                .setInitialMode(ServiceController.Mode.ON_DEMAND)
                .install()
        ;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.