Author: richard.opalka(a)jboss.com
Date: 2010-10-14 05:39:53 -0400 (Thu, 14 Oct 2010)
New Revision: 13117
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java
Log:
getting rid of deprecated @ChannelPipelineCoverage plus fixing synchronization bug
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java 2010-10-14
08:09:34 UTC (rev 13116)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java 2010-10-14
09:39:53 UTC (rev 13117)
@@ -34,13 +34,12 @@
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBufferInputStream;
import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.channel.ChannelPipelineCoverage;
+import org.jboss.netty.channel.ChannelHandler.Sharable;
import org.jboss.netty.channel.ExceptionEvent;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
import org.jboss.netty.handler.codec.http.HttpResponse;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
-import org.jboss.netty.handler.codec.http.HttpVersion;
/**
* A Netty channel upstream handler that receives MessageEvent
@@ -48,9 +47,8 @@
*
* @author alessio.soldano(a)jboss.com
* @since 24-Jun-2009
- *
*/
-@ChannelPipelineCoverage("one")
+@Sharable
public class WSResponseHandler extends SimpleChannelUpstreamHandler
{
private FutureResult future;
@@ -118,13 +116,13 @@
return future;
}
- private class FutureResult implements Future<Result>
+ private static class FutureResult implements Future<Result>
{
- protected Result result;
- protected Throwable exception;
- protected boolean done = false;
- protected boolean cancelled = false;
- protected boolean started = false;
+ private volatile Result result;
+ private volatile Throwable exception;
+ private volatile boolean done = false;
+ private volatile boolean cancelled = false;
+ private volatile boolean started = false;
public FutureResult()
{
@@ -232,7 +230,7 @@
public Map<String, Object> getMetadata();
}
- private class ResultImpl implements Result
+ private static class ResultImpl implements Result
{
private InputStream is;
private Map<String, Object> responseHeaders = new HashMap<String,
Object>();
Show replies by date