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 booleanisMatch(EventSubSubscription subscription) Returns true if the provided subscription is an instance of the current subscription type and matches the current subscription conditionsprotected voidpayload()The event payloadprotected EventSubSubscriptionCompiles the parameters of this object into anEventSubSubscriptionthat can be createdstatic voidsendTestEvent(String type, String version, String payload) Allows sending a test payload to the EventSub handlerprotected voidValidates 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:EventSubSubscriptionTypeValidates that the provided parameters are acceptable for use inEventSubSubscriptionType.proposeSubscription()- Specified by:
validateParametersin classEventSubSubscriptionType- Throws:
IllegalArgumentException- One of the parameters is not acceptable
-
proposeSubscription
Description copied from class:EventSubSubscriptionTypeCompiles the parameters of this object into anEventSubSubscriptionthat can be created- Specified by:
proposeSubscriptionin classEventSubSubscriptionType- Returns:
-
onEventSubInternalNotificationEvent
- Overrides:
onEventSubInternalNotificationEventin classEventSubSubscriptionType
-
isMatch
Description copied from class:EventSubSubscriptionTypeReturns true if the provided subscription is an instance of the current subscription type and matches the current subscription conditions- Specified by:
isMatchin classEventSubSubscriptionType- Returns:
-
payload
The event payload- Returns:
-
sendTestEvent
Allows sending a test payload to the EventSub handler- Parameters:
type- Subscription Typeversion- Subscription Versionpayload- EventSub payload
-