Archived
This forum has been archived. Please start a new discussion on GitHub.
Enhancement request: IceStorm.TopicManager.createOrRetrieve
Hello all,
Every time that I need to get an IceStorm topic, I need to write the same double try-catch sequence like this:
It would be really nice if TopicManagerPrx provided an atomic "createOrRetrieve" method that would encapsulate all of that boilerplate...
MEF
Every time that I need to get an IceStorm topic, I need to write the same double try-catch sequence like this:
TopicManagerPrx tm = // ... initialisation
TopicPrx langTopic = null;
try {
langTopic = tm.create(_LanguageListenerDisp.ice_staticId());
} catch (TopicExists e) {
try {
langTopic = tm.retrieve(_LanguageListenerDisp.ice_staticId());
} catch (NoSuchTopic e2) {
logger.log(LogLevel.Warning, "Couldn't connect to language listener topic");
}
}
It would be really nice if TopicManagerPrx provided an atomic "createOrRetrieve" method that would encapsulate all of that boilerplate...
MEF
0
Comments
-
ping ... anyone else interested in this?

MEF0 -
Yes agreed,0
-
Good idea, I've added it to our TODO list for consideration in a future release.
Mark0