Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractProtocol.java8
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Protocol.java2
2 files changed, 6 insertions, 4 deletions
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractProtocol.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractProtocol.java
index dabe8e146e..67ec05d0b7 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractProtocol.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractProtocol.java
@@ -14,11 +14,13 @@ import org.eclipse.net4j.transport.Buffer;
import org.eclipse.net4j.transport.BufferProvider;
import org.eclipse.net4j.transport.Channel;
import org.eclipse.net4j.transport.Protocol;
+import org.eclipse.net4j.util.lifecycle.AbstractLifecycle;
/**
* @author Eike Stepper
*/
-public abstract class AbstractProtocol implements Protocol, BufferProvider
+public abstract class AbstractProtocol extends AbstractLifecycle implements Protocol,
+ BufferProvider
{
private Channel channel;
@@ -47,8 +49,10 @@ public abstract class AbstractProtocol implements Protocol, BufferProvider
BufferUtil.getBufferProvider(channel).retainBuffer(buffer);
}
- public void dispose()
+ @Override
+ protected void onDeactivate() throws Exception
{
channel = null;
+ super.onDeactivate();
}
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Protocol.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Protocol.java
index 3a7a1c83ec..1accbbff2f 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Protocol.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/Protocol.java
@@ -18,6 +18,4 @@ public interface Protocol extends BufferHandler
public String getProtocolID();
public Channel getChannel();
-
- public void dispose();
}

Back to the top