Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337095

Summary: Improve reusability of TCP classes
Product: [Modeling] EMF Reporter: Caspar D. <caspar_d>
Component: cdo.net4jAssignee: Caspar D. <caspar_d>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3 CC: saulius.tvarijonas
Version: 4.0Flags: stepper: review-
stepper: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch v1
none
Patch v2
none
Patch v3 - ready to be committed none

Description Caspar D. CLA 2011-02-14 04:52:11 EST
The stuff in org.eclipse.net4j.internal.tcp doesn't lend itself
to reuse through inheritance, because too many fields are private,
and essential instantiation code is not factored into overrideable
'createXxx' methods.
Comment 1 Caspar D. CLA 2011-02-14 04:56:48 EST
Created attachment 188883 [details]
Patch v1
Comment 2 Eike Stepper CLA 2011-02-22 06:54:09 EST
I'm generally like the idea to increase the reuse potential. I'm not sure if I like the protected fields in Buffer and TCPConnector. Can you add protected getters and setters instead?
Comment 3 Caspar D. CLA 2011-02-22 21:45:18 EST
Created attachment 189571 [details]
Patch v2
Comment 4 Eike Stepper CLA 2011-02-23 00:27:55 EST
Created attachment 189574 [details]
Patch v3 - ready to be committed

I hope that it's okay that I increased the visibility of the getters and setters to public. And I decreased it to provate again for the context tracer. A derived class is a different context and must declare its own context tracer.
Comment 5 Caspar D. CLA 2011-02-23 00:58:34 EST
Committed to trunk, rev. 7181
Comment 6 Eike Stepper CLA 2011-06-23 03:39:42 EDT
Available in R20110608-1407