Destroy RmiInboundGateway.RmiServiceExporter (#2481)

* Destroy RmiInboundGateway.RmiServiceExporter

The internal instance `RmiServiceExporter` of the `RmiInboundGateway`
has to be destroyed together with the outer instance to unbind `service`
from the RMI registry

* Perform some polishing for the `RmiInboundGateway` and optimize
a `AbstractInboundGatewayParser` for late channels binding

* * Polishing some tests
* Expose getters for channels on the `MessagingGatewaySupport`
* Fix RMI tests to use random port
This commit is contained in:
Artem Bilan
2018-06-15 08:40:11 -04:00
committed by Gary Russell
parent ad4dc11758
commit 5a362b62ff
12 changed files with 136 additions and 117 deletions

View File

@@ -73,8 +73,8 @@ public class RedisQueueInboundGatewayParserTests {
assertFalse(TestUtils.getPropertyValue(this.defaultGateway, "extractPayload", Boolean.class));
assertSame(this.serializer, TestUtils.getPropertyValue(this.defaultGateway, "serializer"));
assertTrue(TestUtils.getPropertyValue(this.defaultGateway, "serializerExplicitlySet", Boolean.class));
assertSame(this.receiveChannel, TestUtils.getPropertyValue(this.defaultGateway, "replyChannel"));
assertSame(this.requestChannel, TestUtils.getPropertyValue(this.defaultGateway, "requestChannel"));
assertSame(this.receiveChannel, this.defaultGateway.getReplyChannel());
assertSame(this.requestChannel, this.defaultGateway.getRequestChannel());
assertEquals(2000L, TestUtils.getPropertyValue(this.defaultGateway, "replyTimeout"));
assertNotNull(TestUtils.getPropertyValue(this.defaultGateway, "taskExecutor"));
assertFalse(TestUtils.getPropertyValue(this.defaultGateway, "autoStartup", Boolean.class));