mirror of https://github.com/apache/activemq.git
The useInactivityMonitor option can now be used to disable configuring a inactivity montior on the transport.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@754963 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b41e1a7579
commit
6e989edaa1
|
@ -96,7 +96,8 @@ public class TcpTransportFactory extends TransportFactory {
|
|||
}
|
||||
}
|
||||
|
||||
if (isUseInactivityMonitor(transport)) {
|
||||
boolean useInactivityMonitor = "true".equals(getOption(options, "useInactivityMonitor", "true"));
|
||||
if (useInactivityMonitor && isUseInactivityMonitor(transport)) {
|
||||
transport = new InactivityMonitor(transport, format);
|
||||
}
|
||||
|
||||
|
@ -108,6 +109,14 @@ public class TcpTransportFactory extends TransportFactory {
|
|||
return transport;
|
||||
}
|
||||
|
||||
private String getOption(Map options, String key, String def) {
|
||||
String rc = (String) options.remove(key);
|
||||
if( rc == null ) {
|
||||
rc = def;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the inactivity monitor should be used on the transport
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue