Class Test
java.lang.Object
com.gmt2001.twitch.eventsub.EventSubSubscriptionType
com.gmt2001.twitch.eventsub.subscriptions.Test
- All Implemented Interfaces:
Flow.Subscriber<EventSubInternalEvent>
Test type for development.
- Author:
- gmt2001
-
Field Summary
Fields inherited from class com.gmt2001.twitch.eventsub.EventSubSubscriptionType
flowsubscription, messageId, messageTimestamp, subscription
-
Constructor Summary
ConstructorsConstructorDescriptionTest()
Only used by EventSub for handler registrationUsed byonEventSubInternalNotificationEvent(com.gmt2001.twitch.eventsub.EventSubInternalNotificationEvent)
to construct an object from an incoming notificationConstructorConstructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isMatch
(EventSubSubscription subscription) Returns true if the provided subscription is an instance of the current subscription type and matches the current subscription conditionsprotected void
payload()
The event payloadprotected EventSubSubscription
Compiles the parameters of this object into anEventSubSubscription
that can be createdprotected void
Validates that the provided parameters are acceptable for use inEventSubSubscriptionType.proposeSubscription()
Methods inherited from class com.gmt2001.twitch.eventsub.EventSubSubscriptionType
create, delete, deleteAll, findMatchingSubscriptionId, findMatchingSubscriptionIds, getExistingSubscription, isAlreadySubscribed, messageId, messageTimestamp, onComplete, onError, onEventSubInternalEvent, onEventSubInternalRevocationEvent, onEventSubInternalVerificationEvent, onNext, onSubscribe, proposeSubscriptionInternal, proposeTransport, subscribe, subscription
-
Constructor Details
-
Test
public Test()Only used by EventSub for handler registration -
Test
Constructor- Parameters:
type
- The subscription typeversion
- The subscription versioncondition
- The subscription condition
-
Test
Constructor- Parameters:
type
- The subscription typeversion
- The subscription versioncondition
- The subscription condition as key-value pairs
-
Test
Used byonEventSubInternalNotificationEvent(com.gmt2001.twitch.eventsub.EventSubInternalNotificationEvent)
to construct an object from an incoming notification- Parameters:
e
- The event
-
-
Method Details
-
validateParameters
Description copied from class:EventSubSubscriptionType
Validates that the provided parameters are acceptable for use inEventSubSubscriptionType.proposeSubscription()
- Specified by:
validateParameters
in classEventSubSubscriptionType
- Throws:
IllegalArgumentException
- One of the parameters is not acceptable
-
proposeSubscription
Description copied from class:EventSubSubscriptionType
Compiles the parameters of this object into anEventSubSubscription
that can be created- Specified by:
proposeSubscription
in classEventSubSubscriptionType
- Returns:
-
onEventSubInternalNotificationEvent
- Overrides:
onEventSubInternalNotificationEvent
in classEventSubSubscriptionType
-
isMatch
Description copied from class:EventSubSubscriptionType
Returns true if the provided subscription is an instance of the current subscription type and matches the current subscription conditions- Specified by:
isMatch
in classEventSubSubscriptionType
- Returns:
-
payload
The event payload- Returns:
-