com.pubnub.internal.endpoints.message_actions.RemoveMessageActionImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pubnub-gson-impl Show documentation
Show all versions of pubnub-gson-impl Show documentation
PubNub is a cross-platform client-to-client (1:1 and 1:many) push service in the cloud, capable of broadcasting real-time messages to millions of web and mobile clients simultaneously, in less than a quarter second!
package com.pubnub.internal.endpoints.message_actions;
import com.pubnub.api.PubNubError;
import com.pubnub.api.PubNubException;
import com.pubnub.api.endpoints.message_actions.RemoveMessageAction;
import com.pubnub.api.models.consumer.message_actions.PNRemoveMessageActionResult;
import com.pubnub.internal.EndpointInterface;
import com.pubnub.internal.PubNubCore;
import com.pubnub.internal.endpoints.IdentityMappingEndpoint;
import lombok.Setter;
import lombok.experimental.Accessors;
@Setter
@Accessors(chain = true, fluent = true)
public class RemoveMessageActionImpl extends IdentityMappingEndpoint implements RemoveMessageAction {
private String channel;
private Long messageTimetoken;
private Long actionTimetoken;
public RemoveMessageActionImpl(PubNubCore pubnub) {
super(pubnub);
}
@Override
protected EndpointInterface createAction() {
return pubnub.removeMessageAction(channel, messageTimetoken, actionTimetoken);
}
@Override
protected void validateParams() throws PubNubException {
if (channel == null) {
throw new PubNubException(PubNubError.CHANNEL_MISSING);
}
if (messageTimetoken == null) {
throw new PubNubException(PubNubError.MESSAGE_TIMETOKEN_MISSING);
}
if (actionTimetoken == null) {
throw new PubNubException(PubNubError.MESSAGE_ACTION_TIMETOKEN_MISSING);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy