Polishing

- Fix the logger level for `onCompleted` method invocation
 - Add `running` check on stop method
 - Update copyright/author
This commit is contained in:
Ilayaperumal Gopinathan
2016-02-16 00:41:41 +05:30
parent 3874620d2a
commit 1216b4b797
2 changed files with 10 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@ import org.springframework.messaging.MessageHandler;
* Configuration class for RxJava module support.
*
* @author Ilayaperumal Gopinathan
* @author Marius Bogoevici
*/
@Configuration
public class RxJavaProcessorConfiguration {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -60,6 +60,7 @@ import rx.subjects.Subject;
*
* @author Mark Pollack
* @author Ilayaperumal Gopinathan
* @author Marius Bogoevici
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public class SubjectMessageHandler extends AbstractMessageProducingHandler implements SmartLifecycle {
@@ -107,7 +108,7 @@ public class SubjectMessageHandler extends AbstractMessageProducingHandler imple
@Override
public void call() {
logger.error("Subscription close for [" + subscription + "]");
logger.info("Subscription close for [" + subscription + "]");
}
});
running = true;
@@ -126,9 +127,11 @@ public class SubjectMessageHandler extends AbstractMessageProducingHandler imple
@Override
public void stop(Runnable callback) {
stop();
if (callback != null) {
callback.run();
if (running) {
stop();
if (callback != null) {
callback.run();
}
}
}