Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #39212
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Andreas Leitgeb <avl@logic.at> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: How to handle methods in a common interface that supports different versions of a message format |
| Date | Tue, 10 Dec 2019 16:41:05 -0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 20 |
| Message-ID | <slrnquvil1.mp5.avl@logic.at> (permalink) |
| References | <2adff0bf-b579-4a12-87bc-70e1fe90a829@googlegroups.com> <qsf3v9$1rqj$1@gioia.aioe.org> <42878753-3e34-4b35-8829-a11f990485d9@googlegroups.com> |
| Reply-To | avl@logic.at |
| Injection-Date | Tue, 10 Dec 2019 16:41:05 -0000 (UTC) |
| Injection-Info | reader02.eternal-september.org; posting-host="a2c1121edb5eed50a949a948231cc736"; logging-data="21673"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19WcIGZFpzbYDwFdK8W0z1v" |
| User-Agent | slrn/1.0.3 (Linux) |
| Cancel-Lock | sha1:eMOGBuTIdxruFBSWJPWCpWd/Wh4= |
| Xref | csiph.com comp.lang.java.programmer:39212 |
Show key headers only | View raw
mike <mikaelpetterson@hotmail.com> wrote:
> Since we only had support for 1.0 user only used Netconf interface. Now
> we will return two types of interfaces Netconf10 or Netconf11. This
> would mean that users using 1.0 (Netconf) now need to use Netconf10 in
> those cases they need Netconf 1.0 specific methods.Correct?
If you had a time of just "NetConf" released to the world, and still need
to support old code using it, then you're bound to leaving the name "NetConf"
there, meaning "NetConf10".
If later versions of that interface can also lose methods, then you might
need to have a set of methods to return each of the set of NetConf##-Interfaces.
NetConf getNetConf() { ... } // Version 1.0
Netconf_1_1 getNetConf_1_1() { ... } // Version 1.1
If instead you only added methods, the interfaces could inherit the lower-
version interfaces, and your code would just return the latest Interface
version and that would painlessly cast to whatever older interface version
the user is using. I'd try hard to get on this track.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
How to handle methods in a common interface that supports different versions of a message format mike <mikaelpetterson@hotmail.com> - 2019-12-05 23:55 -0800
How to handle methods in a common interface that supports different versions of a message format javaXp <n.sharir@gmail.com> - 2019-12-06 04:27 -0800
Re: How to handle methods in a common interface that supports different versions of a message format Arne Vajhøj <arne@vajhoej.dk> - 2019-12-06 21:49 -0500
Re: How to handle methods in a common interface that supports different versions of a message format mike <mikaelpetterson@hotmail.com> - 2019-12-08 23:51 -0800
Re: How to handle methods in a common interface that supports different versions of a message format Arne Vajhøj <arne@vajhoej.dk> - 2019-12-09 21:24 -0500
Re: How to handle methods in a common interface that supports different versions of a message format Andreas Leitgeb <avl@logic.at> - 2019-12-10 16:41 +0000
csiph-web