Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337095 - Improve reusability of TCP classes
Summary: Improve reusability of TCP classes
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.net4j (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Caspar D. CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-14 04:52 EST by Caspar D. CLA
Modified: 2011-06-23 03:39 EDT (History)
1 user (show)

See Also:
stepper: review-
stepper: review+


Attachments
Patch v1 (8.81 KB, patch)
2011-02-14 04:56 EST, Caspar D. CLA
no flags Details | Diff
Patch v2 (9.26 KB, patch)
2011-02-22 21:45 EST, Caspar D. CLA
no flags Details | Diff
Patch v3 - ready to be committed (8.88 KB, patch)
2011-02-23 00:27 EST, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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