Enhancement request: IceStorm.TopicManager.createOrRetrieve

in Help Center
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
MEF
Mark