summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-10-27 04:46:31 (EDT)
committerEike Stepper2006-10-27 04:46:31 (EDT)
commitb43b6c09186e337eff2ef753f70af1d0d398bcdf (patch)
tree45c2cd081e8df2a12f4b7841554dc000be9ead44
parent3dcfb43259997d4be5d8e40c3756258bd63e5deb (diff)
downloadcdo-b43b6c09186e337eff2ef753f70af1d0d398bcdf.zip
cdo-b43b6c09186e337eff2ef753f70af1d0d398bcdf.tar.gz
cdo-b43b6c09186e337eff2ef753f70af1d0d398bcdf.tar.bz2
Added lifecycle
-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 dabe8e1..67ec05d 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 3a7a1c8..1accbbf 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();
}