You mean, the ScopeManager can "put something in" upon scope entry and remove it upon scope exit? That's cool, but the question is, what is passed to Scope.scope() to allow me to look up the Map of scoped objects? The only things passed to Scope.scope() are Key<T> and Provider<T>. Neither of these things are available to me at "scope entry" time.
-Russ On Wed, Mar 24, 2010 at 5:00 PM, Fred Faber <[email protected]> wrote: > the scope manager could pick a random number. or it could use the time of > day. or it can reference a static value set by another thread. I don't > mean to be facetious but it is really that arbitrary. > > do you have a use case in mind? I would be happy to fill in more details if > need be. > > On Mar 24, 2010 4:11 PM, "Russ Milliken" <[email protected]> wrote: > > I don't understand your reference to a Thread. I want a Scope that is * > not* Thread-based. MyScopeManager in your example should not determine > which objects are "in scope" based on what Thread is in context. Given > that, how should my Scope implementation or MyScopeManager determine in > which scope the given Key resides? > > Thanks, > > -Russ > > On Wed, Mar 24, 2010 at 3:08 PM, Fred Faber <[email protected]> wrote: > >> > >> > You can do this if your lookup key is accessible to the thread >> performing the lookup, at lookup ... >> >> >> > >> > >> > >> > On Wed, Mar 24, 2010 at 2:47 PM, Russ <[email protected]> wrote: >> >> >> >> >> >> >> >> ... >> -- >> >> > You received this message because you are subscribed to the Google >> Groups "google-guice" group. >> > ... >> > > -- > > You received this message because you are subscribed to the Google Groups > "google-guice" group. > To p... > > -- > You received this message because you are subscribed to the Google Groups > "google-guice" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-guice%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-guice?hl=en. > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.
