public Set<PluginMessageListenerRegistration> getIncomingChannelRegistrations(Plugin plugin, String channel) {
if (plugin == null) {
throw new IllegalArgumentException("Plugin cannot be null");
}
validateChannel(channel);
synchronized (incomingLock) {
Set<PluginMessageListenerRegistration> registrations = incomingByPlugin.get(plugin);
if (registrations != null) {
Builder<PluginMessageListenerRegistration> builder = ImmutableSet.builder();
for (PluginMessageListenerRegistration registration : registrations) {
if (registration.getChannel().equals(channel)) {
builder.add(registration);
}
}
return builder.build();
} else {
return ImmutableSet.of();
}
}
}
StandardMessenger.java 文件源码
java
阅读 47
收藏 0
点赞 0
评论 0
项目:Cauldron
作者:
评论列表
文章目录