Examples of clientId()


Examples of com.google.appengine.api.channel.ChannelPresence.clientId()

                        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

Examples of com.google.appengine.api.channel.ChannelPresence.clientId()

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

Examples of com.google.appengine.api.channel.ChannelPresence.clientId()

  @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()){
      log.info(email+" is online = "+isOnline()+". Sending message to "+online);
View Full Code Here

Examples of com.google.appengine.api.channel.ChannelPresence.clientId()

  @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();
    String key;
View Full Code Here

Examples of com.google.appengine.api.channel.ChannelPresence.clientId()

  @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 ){
      EMF.insert(user);
View Full Code Here

Examples of com.google.appengine.api.channel.ChannelPresence.clientId()

    @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 kafka.javaapi.consumer.SimpleConsumer.clientId()

    // Fire offset request
    OffsetRequest request = new OffsetRequest(ImmutableMap.of(
      new TopicAndPartition(topicPart.getTopic(), topicPart.getPartition()),
      new PartitionOffsetRequestInfo(timestamp, 1)
    ), kafka.api.OffsetRequest.CurrentVersion(), consumer.clientId());

    OffsetResponse response = consumer.getOffsetsBefore(request);

    // Retrieve offsets from response
    long[] offsets = response.hasError() ? null : response.offsets(topicPart.getTopic(), topicPart.getPartition());
View Full Code Here

Examples of org.fusesource.mqtt.codec.CONNECT.clientId()

    @Test
    public void testConnectThenSubscribe() throws Exception {

        CONNECT connect = new CONNECT();
        connect.cleanSession(true);
        connect.clientId(new UTF8Buffer(""));

        DataByteArrayOutputStream output = new DataByteArrayOutputStream();
        wireFormat.marshal(connect.encode(), output);
        Buffer marshalled = output.toBuffer();
View Full Code Here

Examples of org.fusesource.mqtt.codec.CONNECT.clientId()

    @Test
    public void testConnectWithCredentialsBackToBack() throws Exception {

        CONNECT connect = new CONNECT();
        connect.cleanSession(false);
        connect.clientId(new UTF8Buffer("test"));
        connect.userName(new UTF8Buffer("user"));
        connect.password(new UTF8Buffer("pass"));

        DataByteArrayOutputStream output = new DataByteArrayOutputStream();
        wireFormat.marshal(connect.encode(), output);
View Full Code Here

Examples of org.fusesource.mqtt.codec.CONNECT.clientId()

            connect = new CONNECT().decode(frame);
            LOG.info("Unmarshalled: {}", connect);
            assertFalse(connect.cleanSession());
            assertEquals("user", connect.userName().toString());
            assertEquals("pass", connect.password().toString());
            assertEquals("test", connect.clientId().toString());
        }
    }

    @Test
    public void testProcessInChunks() throws Exception {
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.