1 // Copyright 2010 Google Inc. All rights reserved.
3 package com
.google
.appengine
.api
.channel
;
6 * Class that represents a channel message. {@code ChannelMessages} can be
7 * sent as outgoing messages or can be parsed as incoming messages by
8 * {@link ChannelService#parseMessage}.
11 public final class ChannelMessage
{
13 private final String clientId
;
14 private final String message
;
17 * Constructor for a channel message.
19 * @param clientId identifies the client that will receive this message. The
20 * client should be connected to the channel using a token created by
21 * ChannelService.CreateChannel, using the same client id. The client id
22 * must be fewer than 64 bytes when encoded to UTF-8.
23 * @param message the message payload. The payload must be smaller than 32K
24 * when encoded to UTF-8.
26 public ChannelMessage(String clientId
, String message
) {
27 this.clientId
= clientId
;
28 this.message
= message
;
31 public String
getClientId() {
35 public String
getMessage() {