[jboss-remoting-commits] JBoss Remoting SVN: r4807 - in remoting3/trunk: core/src/main/java/org/jboss/remoting/core and 1 other directory.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Wed Jan 14 17:01:32 EST 2009
Author: david.lloyd at jboss.com
Date: 2009-01-14 17:01:32 -0500 (Wed, 14 Jan 2009)
New Revision: 4807
Modified:
remoting3/trunk/api/src/main/java/org/jboss/remoting/Client.java
remoting3/trunk/core/src/main/java/org/jboss/remoting/core/ClientImpl.java
Log:
Client.send() should return IoFuture<? extends O> rather than IoFuture<O>; also add some logging
Modified: remoting3/trunk/api/src/main/java/org/jboss/remoting/Client.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/remoting/Client.java 2009-01-14 22:00:26 UTC (rev 4806)
+++ remoting3/trunk/api/src/main/java/org/jboss/remoting/Client.java 2009-01-14 22:01:32 UTC (rev 4807)
@@ -84,7 +84,7 @@
*
* @throws IOException if the request could not be sent
*/
- IoFuture<O> send(I request) throws IOException;
+ IoFuture<? extends O> send(I request) throws IOException;
/**
* Get the attribute map. This map holds metadata about the current clinet.
Modified: remoting3/trunk/core/src/main/java/org/jboss/remoting/core/ClientImpl.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/remoting/core/ClientImpl.java 2009-01-14 22:00:26 UTC (rev 4806)
+++ remoting3/trunk/core/src/main/java/org/jboss/remoting/core/ClientImpl.java 2009-01-14 22:01:32 UTC (rev 4807)
@@ -73,6 +73,7 @@
if (! isOpen()) {
throw new IOException("Client is not open");
}
+ log.trace("Client.invoke() sending request \"%s\"", request);
final I actualRequest = castRequest(request);
final QueueExecutor executor = new QueueExecutor();
final FutureReplyImpl<O> futureReply = new FutureReplyImpl<O>(executor, replyClass);
@@ -82,7 +83,9 @@
futureReply.addNotifier(IoUtils.<O>attachmentClosingNotifier(), executor);
executor.runQueue();
try {
- return futureReply.getInterruptibly();
+ final O reply = futureReply.getInterruptibly();
+ log.trace("Client.invoke() received reply \"%s\"", reply);
+ return reply;
} catch (InterruptedException e) {
try {
futureReply.cancel();
@@ -93,10 +96,11 @@
}
}
- public IoFuture<O> send(final I request) throws IOException {
+ public IoFuture<? extends O> send(final I request) throws IOException {
if (! isOpen()) {
throw new IOException("Client is not open");
}
+ log.trace("Client.send() sending request \"%s\"", request);
final I actualRequest = castRequest(request);
final FutureReplyImpl<O> futureReply = new FutureReplyImpl<O>(executor, replyClass);
final ReplyHandler replyHandler = futureReply.getReplyHandler();
More information about the jboss-remoting-commits
mailing list