[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting ...
Ron Sigal
ron_sigal at yahoo.com
Tue Jun 19 02:04:30 EDT 2007
User: rsigal
Date: 07/06/19 02:04:30
Modified: src/main/org/jboss/remoting Tag: remoting_2_x Client.java
Log:
JBREM-757: Implemented quick version of removeListener() for pull callbacks.
Revision Changes Path
No revision
No revision
1.53.2.33 +19 -4 JBossRemoting/src/main/org/jboss/remoting/Client.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Client.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/Client.java,v
retrieving revision 1.53.2.32
retrieving revision 1.53.2.33
diff -u -b -r1.53.2.32 -r1.53.2.33
--- Client.java 16 Jun 2007 06:09:37 -0000 1.53.2.32
+++ Client.java 19 Jun 2007 06:04:29 -0000 1.53.2.33
@@ -68,7 +68,7 @@
* @author <a href="mailto:telrod at e2technologies.net">Tom Elrod</a>
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
*
- * @version $Revision: 1.53.2.32 $
+ * @version $Revision: 1.53.2.33 $
*/
public class Client implements Externalizable
{
@@ -1024,9 +1024,24 @@
if(listenerId != null)
{
// have a pull callback handler
+ // If disconnectTimeout == 0, skip network i/o.
+ if (disconnectTimeout != 0)
+ {
Map metadata = new HashMap();
metadata.put(LISTENER_ID_KEY, listenerId);
+
+ if (disconnectTimeout > 0)
+ metadata.put(ServerInvoker.TIMEOUT, Integer.toString(disconnectTimeout));
+
+ try
+ {
invoke(new InternalInvocation(InternalInvocation.REMOVELISTENER, null), metadata);
+ }
+ catch (Exception e)
+ {
+ log.warn("unable to remove remote callback handler: " + e.getMessage());
+ }
+ }
// clean up callback poller if one exists
CallbackPoller callbackPoller = (CallbackPoller) callbackPollers.remove(callbackHandler);
More information about the jboss-cvs-commits
mailing list