public UnregisterResponseImpl(final String channelId, final Status status) { super(channelId); checkNotNull(status, "status"); this.status = status; }
public DefaultChannel(final String uaid, final String channelId, final long version, final String endpointToken) { checkNotNull(uaid, "uaid"); checkNotNull(channelId, "channelId"); checkNotNegative(version, "version"); checkNotNull(endpointToken, "endpointToken"); this.uaid = uaid; this.channelId = channelId; this.version = version; this.endpointToken = endpointToken; }
public NotificationMessageImpl(final Set<Ack> acks) { checkNotNullAndNotEmpty(acks, "acks"); this.acks = acks; }
public UnregisterResponseImpl(final String channelId, final Status status) { super(channelId); checkNotNull(status, "status"); this.status = status; }
public NotificationMessageImpl(final Set<Ack> acks) { checkNotNullAndNotEmpty(acks, "acks"); this.acks = acks; }
public HelloResponseImpl(final String uaid) { checkNotNull(uaid, "uaid"); this.uaid = uaid; }
public PingMessageImpl(final String body) { ArgumentUtil.checkNotNullAndNotEmpty(body, "body"); this.body = body; }
public AckImpl(final String channelId, final long version) { checkNotNull(channelId, "channelId"); checkNotNull(version, "version"); this.channelId = channelId; this.version = version; }
public PingMessageImpl(final String body) { ArgumentUtil.checkNotNullAndNotEmpty(body, "body"); this.body = body; }
public RegisterResponseImpl(final String channelId, final Status status, final String pushEndpoint) { super(channelId); checkNotNull(status, "status"); checkNotNull(pushEndpoint, "pushEndpoint"); this.status = status; this.pushEndpoint = pushEndpoint; }
public UnregisterMessageImpl(final String channelId) { checkNotNull(channelId, "channelId"); this.channelId = channelId; }
public AckImpl(final String channelId, final long version) { checkNotNull(channelId, "channelId"); checkNotNull(version, "version"); this.channelId = channelId; this.version = version; }
public RegisterResponseImpl(final String channelId, final Status status, final String pushEndpoint) { super(channelId); checkNotNull(status, "status"); checkNotNull(pushEndpoint, "pushEndpoint"); this.status = status; this.pushEndpoint = pushEndpoint; }
public RegisterMessageImpl(final String channelId) { checkNotNull(channelId, "channelId"); this.channelId = channelId; }
public RegisterMessageImpl(final String channelId) { checkNotNull(channelId, "channelId"); this.channelId = channelId; }
public UnregisterMessageImpl(final String channelId) { checkNotNull(channelId, "channelId"); this.channelId = channelId; }
public HelloResponseImpl(final String uaid) { checkNotNull(uaid, "uaid"); this.uaid = uaid; }
public static <T> void checkNotNullAndNotEmpty(final T ref, final String name) { checkNotNull(ref, name); if ("".equals(ref)) { throw new IllegalArgumentException("[" + name + "] must not be empty"); } }
public static void checkNotNullAndNotEmpty(final Collection<?> c, final String name) { checkNotNull(c, name); if (c.isEmpty()) { throw new IllegalArgumentException("Collection[" + name + "] must not be empty"); } }
@Override public Set<Ack> getUnacknowledged(final String uaid) { checkNotNull(uaid, "uaid"); final Set<Ack> acks = unacked.get(uaid); if (acks == null) { return Collections.emptySet(); } return Collections.unmodifiableSet(acks); }