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 SummaryFields inherited from class com.gmt2001.twitch.eventsub.EventSubSubscriptionTypeflowsubscription, messageId, messageTimestamp, subscription
- 
Constructor SummaryConstructorsConstructorDescriptionTest()Only used by EventSub for handler registrationUsed byonEventSubInternalNotificationEvent(com.gmt2001.twitch.eventsub.EventSubInternalNotificationEvent)to construct an object from an incoming notificationConstructorConstructor
- 
Method SummaryModifier 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.EventSubSubscriptionTypecreate, delete, deleteAll, findMatchingSubscriptionId, findMatchingSubscriptionIds, getExistingSubscription, isAlreadySubscribed, messageId, messageTimestamp, onComplete, onError, onEventSubInternalEvent, onEventSubInternalRevocationEvent, onEventSubInternalVerificationEvent, onNext, onSubscribe, proposeSubscriptionInternal, proposeTransport, subscribe, subscription
- 
Constructor Details- 
Testpublic Test()Only used by EventSub for handler registration
- 
TestConstructor- Parameters:
- type- The subscription type
- version- The subscription version
- condition- The subscription condition
 
- 
TestConstructor- Parameters:
- type- The subscription type
- version- The subscription version
- condition- The subscription condition as key-value pairs
 
- 
TestUsed byonEventSubInternalNotificationEvent(com.gmt2001.twitch.eventsub.EventSubInternalNotificationEvent)to construct an object from an incoming notification- Parameters:
- e- The event
 
 
- 
- 
Method Details- 
validateParametersDescription copied from class:EventSubSubscriptionTypeValidates that the provided parameters are acceptable for use inEventSubSubscriptionType.proposeSubscription()- Specified by:
- validateParametersin class- EventSubSubscriptionType
- Throws:
- IllegalArgumentException- One of the parameters is not acceptable
 
- 
proposeSubscriptionDescription copied from class:EventSubSubscriptionTypeCompiles the parameters of this object into anEventSubSubscriptionthat can be created- Specified by:
- proposeSubscriptionin class- EventSubSubscriptionType
- Returns:
 
- 
onEventSubInternalNotificationEvent- Overrides:
- onEventSubInternalNotificationEventin class- EventSubSubscriptionType
 
- 
isMatchDescription 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 class- EventSubSubscriptionType
- Returns:
 
- 
payloadThe event payload- Returns:
 
- 
sendTestEventAllows sending a test payload to the EventSub handler- Parameters:
- type- Subscription Type
- version- Subscription Version
- payload- EventSub payload
 
 
-