Skip to content

Commit a78ea40

Browse files
committed
add hasChannel(), hasSubscriptionOf()
1 parent 921659b commit a78ea40

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/com/hosopy/actioncable/Consumer.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,19 @@ public void setStaleThresholdInSecond(int staleThresholdInSecond){
127127
if(connectionMonitor !=null) connectionMonitor.setStaleThresholdInSecond(staleThresholdInSecond);
128128
}
129129

130+
@Deprecated
130131
public boolean hasSubscription(String channel) {
131132
return subscriptions != null && subscriptions.hasSubscription(channel);
132133
}
133134

135+
public boolean hasChannel(String channel) {
136+
return subscriptions != null && subscriptions.hasChannel(channel);
137+
}
138+
139+
public boolean hasSubscriptionFor(String channel) {
140+
return subscriptions != null && subscriptions.hasSubscriptionOf(channel);
141+
}
142+
134143
public Connection getConnection() {
135144
return connection;
136145
}

0 commit comments

Comments
 (0)