This commit is contained in:
crusader 2018-03-19 18:35:23 +09:00
parent 1d03d268d5
commit 53770b8c63
2 changed files with 9 additions and 0 deletions

View File

@ -9,5 +9,6 @@ public interface MessagePublisher {
void publishToMember(final String memberID, final String method, final Object... params); void publishToMember(final String memberID, final String method, final Object... params);
void publishToMemberSession(final String memberSessionID, final String method, final Object... params); void publishToMemberSession(final String memberSessionID, final String method, final Object... params);
void publishToNoAuthProbe(final String tempProbeKey, final String method, final Object... params);
void publishToProbe(final String probeKey, final String method, final Object... params); void publishToProbe(final String probeKey, final String method, final Object... params);
} }

View File

@ -19,6 +19,7 @@ import java.util.Map;
@Service @Service
public class RedisMessagePublisher implements MessagePublisher { public class RedisMessagePublisher implements MessagePublisher {
private static final String CHANNEL_WEBAPP = "/webapp"; private static final String CHANNEL_WEBAPP = "/webapp";
private static final String CHANNEL_NOAUTH_PROBE = "/auth";
private static final String CHANNEL_PROBE = "/probe"; private static final String CHANNEL_PROBE = "/probe";
@Autowired @Autowired
@ -64,6 +65,13 @@ public class RedisMessagePublisher implements MessagePublisher {
this.publish(CHANNEL_WEBAPP, message, method, params); this.publish(CHANNEL_WEBAPP, message, method, params);
} }
public void publishToNoAuthProbe(final String tempProbeKey, final String method, final Object... params) {
PublishMessage message = new PublishMessage();
message.setTargetType(PublishMessage.TargetType.PROBE);
message.addTarget(tempProbeKey);
this.publish(CHANNEL_NOAUTH_PROBE, message, method, params);
}
public void publishToProbe(final String probeKey, final String method, final Object... params) { public void publishToProbe(final String probeKey, final String method, final Object... params) {
PublishMessage message = new PublishMessage(); PublishMessage message = new PublishMessage();
message.setTargetType(PublishMessage.TargetType.PROBE); message.setTargetType(PublishMessage.TargetType.PROBE);