publishToProbe have been added
This commit is contained in:
parent
905ebd6adf
commit
7c1df07898
|
@ -6,4 +6,6 @@ public interface MessagePublisher {
|
|||
void publishToMember(final String channel, final String memberID, final String method, final Object... params);
|
||||
void publishToDomain(final String channel, final Domain domain, final String method, final Object... params);
|
||||
void publishToDomainByProbeKey(final String channel, final String probeKey, final String method, final Object... params);
|
||||
void publishToProbe(final String channel, final String key, final String method, final Object... params);
|
||||
|
||||
}
|
||||
|
|
|
@ -104,11 +104,17 @@ public class NoAuthProbeService {
|
|||
|
||||
this.probeService.regist(probe);
|
||||
this.noAuthProbeDAO.save(noAuthProbe);
|
||||
|
||||
messagePublisher.publishToProbe("/auth", noAuthProbe.getTempProbeKey(), "NoAuthProbeService.acceptNoAuthProbe", probe.getProbeKey());
|
||||
|
||||
return this.readAllByDomain(noAuthProbe.getDomain());
|
||||
}
|
||||
|
||||
public List<NoAuthProbe> denyNoauthProbe(NoAuthProbe noAuthProbe) {
|
||||
this.noAuthProbeDAO.save(noAuthProbe);
|
||||
|
||||
messagePublisher.publishToProbe("/auth", noAuthProbe.getTempProbeKey(), "NoAuthProbeService.denyNoauthProbe");
|
||||
|
||||
return this.readAllByDomain(noAuthProbe.getDomain());
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,12 @@ public class RedisMessagePublisher implements MessagePublisher {
|
|||
this.publish(channel, message, method, params);
|
||||
}
|
||||
|
||||
public void publishToProbe(final String channel, final String key, final String method, final Object... params) {
|
||||
PublishMessage message = new PublishMessage();
|
||||
message.addTarget(key);
|
||||
this.publish(channel, message, method, params);
|
||||
}
|
||||
|
||||
@Cacheable("memberListByDomain")
|
||||
protected List<String> getMemberListByDomain(final Domain domain) {
|
||||
return this.getMemberList(memberService.readAllByDomain(domain));
|
||||
|
|
Loading…
Reference in New Issue
Block a user