Author: ron.sigal(a)jboss.com
Date: 2008-11-28 20:16:55 -0500 (Fri, 28 Nov 2008)
New Revision: 4741
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/Client.java
Log:
JBREM-1069: addConnectionListener(ConnectionListener listener) puts default ping period in
metadata map only if ping period is not configured in configuration map.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/Client.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/Client.java 2008-11-29 01:02:41 UTC
(rev 4740)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/Client.java 2008-11-29 01:16:55 UTC
(rev 4741)
@@ -376,7 +376,13 @@
*/
public void addConnectionListener(ConnectionListener listener)
{
- addConnectionListener(listener, (int)ConnectionValidator.DEFAULT_PING_PERIOD);
+ HashMap metadata = new HashMap();
+ if (configuration.get(ConnectionValidator.VALIDATOR_PING_PERIOD) == null)
+ {
+ String pingPeriod = Long.toString(ConnectionValidator.DEFAULT_PING_PERIOD);
+ metadata.put(ConnectionValidator.VALIDATOR_PING_PERIOD, pingPeriod);
+ }
+ addConnectionListener(listener, metadata);
}
/**
Show replies by date