Skip to contentSkip to conversation

widening Messenger::create

DISCUSSION Matt W. Benjamin 1 participant 1 message Jan 29, 2015 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

I was going to do a proplist arg type thing? I'll adapt it until hopefully shared happiness breaks out...

Matt

Quoted 38 lines · ----- "Sage Weil
Quoted 8 lines · Matt W. Benjamin

Hi,

Quoted 4 lines · ----- "Sage Weil
Quoted 3 lines · Matt W. Benjamin

Hi,

I'm looking at ways to pass potentially messenger-specific

options

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

through the Messenger factory. The immediate parameter I need to

provide is the number of Accelio portals to set up (this should

vary

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

by Messenger instance), but I expect others will be needed in future. I don't think this fits cleanly on to the Policy

mechanism,

Quoted 1 line
Quoted 1 line
Quoted 1 line

though I looked at that. I think I'd like to provide a

generalized

Quoted 1 line
Quoted 1 line
Quoted 1 line

argument to the Messenger factory, which can do the right thing

for

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

a given Messenger (e.g., constructor).

In the past we've mostly gotten away with impl-specific config options.
Is that not sufficient here? Because you need to pass different parameters to different instances maybe?

Yes, exactly.

Hmm, in that case I'd say if you can make it as generic as possible that's
about all we can do that this point. Just a single arg now? We can easily expand the interface to a param struct later. (Or do that now if
you prefer.. whatever works and looks reasonable!)

sage

Signature · 10 lines
Matt Benjamin
CohortFS, LLC.
315 West Huron Street, Suite 140A
Ann Arbor, Michigan 48103

http://cohortfs.com

tel.  734-761-4689 
fax.  734-769-8938 
cel.  734-216-5309