Class PubSubAuthRevokeEvent
java.lang.Object
com.github.philippheuer.events4j.core.domain.Event
com.github.twitch4j.common.events.TwitchEvent
com.github.twitch4j.pubsub.events.PubSubAuthRevokeEvent
- All Implemented Interfaces:
com.github.philippheuer.events4j.api.domain.IEvent
Fired when a user access token had outstanding PubSub subscriptions, but was revoked.
An authorization can be revoked at any time for a number of reasons, such a user disconnecting from an app through Connections Settings.
Topics associated with the authorization will automatically be unlistened to.
-
Constructor Summary
ConstructorDescriptionPubSubAuthRevokeEvent
(ITwitchPubSub socket, @NotNull Map<@NotNull String, @Nullable PubSubRequest> revokedListensByTopic) Creates a newPubSubAuthRevokeEvent
instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
@NotNull Map<@NotNull String,
@Nullable PubSubRequest> Mappings of revoked topic names to the associatedPubSubRequest
(LISTEN).The PubSub websocket that was subscribed to these revoked topics.@NotNull Collection<String>
int
hashCode()
toString()
Methods inherited from class com.github.philippheuer.events4j.core.domain.Event
getEventId, getFiredAt, getFiredAtInstant, getServiceMediator, setEventId, setFiredAt, setFiredAtInstant, setServiceMediator
-
Constructor Details
-
PubSubAuthRevokeEvent
public PubSubAuthRevokeEvent(ITwitchPubSub socket, @NotNull @NotNull Map<@NotNull String, @Nullable PubSubRequest> revokedListensByTopic) Creates a newPubSubAuthRevokeEvent
instance.- Parameters:
socket
- The PubSub websocket that was subscribed to these revoked topics.revokedListensByTopic
- Mappings of revoked topic names to the associatedPubSubRequest
(LISTEN).Warning: Values can be null if you manually call
ITwitchPubSub.listenOnTopic(PubSubRequest)
orITwitchPubSub.listenOnTopic(PubSubType, OAuth2Credential, Collection)
with requests that contain more than one topic in a singlePubSubType.LISTEN
.
-
-
Method Details
-
getTopicNames
- Returns:
- the topics that were revoked (including the user id's)
-
getSocket
The PubSub websocket that was subscribed to these revoked topics. -
getRevokedListensByTopic
Mappings of revoked topic names to the associatedPubSubRequest
(LISTEN).Warning: Values can be null if you manually call
ITwitchPubSub.listenOnTopic(PubSubRequest)
orITwitchPubSub.listenOnTopic(PubSubType, OAuth2Credential, Collection)
with requests that contain more than one topic in a singlePubSubType.LISTEN
. -
toString
- Overrides:
toString
in classTwitchEvent
-
equals
- Overrides:
equals
in classTwitchEvent
-
canEqual
- Overrides:
canEqual
in classTwitchEvent
-
hashCode
public int hashCode()- Overrides:
hashCode
in classTwitchEvent
-