Author: ron.sigal(a)jboss.com
Date: 2008-11-28 20:00:15 -0500 (Fri, 28 Nov 2008)
New Revision: 4739
Modified:
remoting2/branches/2.2/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.2/src/main/org/jboss/remoting/Client.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/Client.java 2008-11-21 07:09:55 UTC
(rev 4738)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/Client.java 2008-11-29 01:00:15 UTC
(rev 4739)
@@ -340,7 +340,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