-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSubscriptionEvent.java
More file actions
37 lines (31 loc) · 1.03 KB
/
SubscriptionEvent.java
File metadata and controls
37 lines (31 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.taahyt.pubsubbubhub.events.impl;
public class SubscriptionEvent {
private final int statusCode;
private final String statusReason;
private final boolean successful;
private final boolean unsubscribed;
/**
* This event is called when a subscription is made
* @param statusCode - Returns the status after subscribing
* @param statusReason - Returns the reason for the status
* @param successful - Status code = 202 if successful
*/
public SubscriptionEvent(int statusCode, String statusReason, boolean successful, boolean unsubscribed) {
this.statusCode = statusCode;
this.statusReason = statusReason;
this.successful = successful;
this.unsubscribed = unsubscribed;
}
public int getStatusCode() {
return statusCode;
}
public String getStatusReason() {
return statusReason;
}
public boolean isSuccessful() {
return successful;
}
public boolean isUnsubscribed() {
return unsubscribed;
}
}