From 8f3f34633d740f59bc0fb475eff0ce018a2998e1 Mon Sep 17 00:00:00 2001
From: Simone Bordet
Date: Thu, 23 Feb 2012 23:24:56 +0100
Subject: [PATCH] Simplified Handler by removing the context parameter from
failed().
---
.../main/java/org/eclipse/jetty/spdy/Promise.java | 2 +-
.../java/org/eclipse/jetty/spdy/StandardSession.java | 12 ++++++------
.../java/org/eclipse/jetty/spdy/api/Handler.java | 10 ++++------
3 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/spdy-core/src/main/java/org/eclipse/jetty/spdy/Promise.java b/spdy-core/src/main/java/org/eclipse/jetty/spdy/Promise.java
index 58b037e0c74..582ed54ba83 100644
--- a/spdy-core/src/main/java/org/eclipse/jetty/spdy/Promise.java
+++ b/spdy-core/src/main/java/org/eclipse/jetty/spdy/Promise.java
@@ -38,7 +38,7 @@ public class Promise implements Handler, Future
latch.countDown();
}
- public void failed(Throwable x, T context)
+ public void failed(Throwable x)
{
this.failure = x;
latch.countDown();
diff --git a/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardSession.java b/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardSession.java
index 6e887f143a2..83a9405dc3a 100644
--- a/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardSession.java
+++ b/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardSession.java
@@ -140,7 +140,7 @@ public class StandardSession implements ISession, Parser.Listener, HandlerA callback abstraction that handles completed/failed events of asynchronous operations.
- * Instances of this class capture a context that is made available on completion
- * and failure callbacks.
+ * Instances of this class capture a context that is made available on the completion callback.
*
* @param the type of the context object
*/
@@ -29,7 +28,7 @@ public interface Handler
* Callback invoked when the operation completes.
*
* @param context the context
- * @see #failed(Throwable, Object)
+ * @see #failed(Throwable)
*/
public abstract void completed(C context);
@@ -37,9 +36,8 @@ public interface Handler
* Callback invoked when the operation fails.
*
* @param x the reason for the operation failure
- * @param context the context
*/
- public void failed(Throwable x, C context);
+ public void failed(Throwable x);
/**
* Empty implementation of {@link Handler}
@@ -54,7 +52,7 @@ public interface Handler
}
@Override
- public void failed(Throwable x, C context)
+ public void failed(Throwable x)
{
throw new SPDYException(x);
}