Package com.google.appengine.api.channel

Examples of com.google.appengine.api.channel.ChannelService.parsePresence()


        @Override
        protected void doPost(HttpServletRequest req, HttpServletResponse resp)
                        throws ServletException, IOException {
                // Handle request and write response
                ChannelService channelService = ChannelServiceFactory.getChannelService();
                ChannelPresence presence = channelService.parsePresence(req);
              
                String email=presence.clientId();
              
                DataOperation.deletePlayerWithEmail(email);
                            
View Full Code Here


    }
  }
 
  public static String parsePresence(HttpServletRequest req) throws IOException {
    ChannelService channelService = ChannelServiceFactory.getChannelService();
    ChannelPresence presence = channelService.parsePresence(req);
    String clientId = presence.clientId();
    return clientId;
  }
 
  // ========================================================================= //
View Full Code Here

 
  @Override
  public void manage(HttpServletRequest req, HttpServletResponse resp)
      throws IOException {
    ChannelService channelService = ChannelServiceFactory.getChannelService();
    ChannelPresence presence = channelService.parsePresence(req);
    String email = presence.clientId();
    UserBeanOAM oam = provider.get();
    oam.updateOnline(isOnline(), email);
    GetUserInfoResult result = oam.getGetUserInfoResult(email);
    for(String online : result.getOnline()){
View Full Code Here

  private static final long serialVersionUID = 1L;

  @Override
  public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    ChannelService channelService = ChannelServiceFactory.getChannelService();
    ChannelPresence presence = channelService.parsePresence(req);
    String userId = presence.clientId();
   
    User u = Checkers.userMap.remove(userId);
    //send a note to all connected users
    Enumeration<String> keys = Checkers.userMap.keys();
View Full Code Here

  private static final long serialVersionUID = 1L;

  @Override
  public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    ChannelService channelService = ChannelServiceFactory.getChannelService();
    ChannelPresence presence = channelService.parsePresence(req);
    String userId = presence.clientId();

    User user = Checkers.inSignIn.get(userId);
    User u = EMF.getUser(userId);
    if( u == null ){
View Full Code Here

    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

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.