Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] [IdAS] new methods doc

Maybe we need to better define the needs, purpose, semantics of this
method.

Does a response of true mean that a subsequent call to createContext
will succeed? Or does it simply mean that the factory is configured to
instantiate the type of context specified by the URL?

It's probably true that it's fairly lightweight to instantiate an
unopened IContext instance and copy the URI and metadata into it, but
the act of copying the URI and metadata into it may trigger the IContext
instance to attempt to process that data. Providers for which
IContext.open is lightweight, can implement canCreate by instantiating,
calling open, and then releasing the reference to the IContext impl.

That said, I don't care if we remove this method until a better case can
be made for it.

Jim

 

>>> Greg Byrd <gbyrd@xxxxxxxx> 07/27/06 6:22 PM >>>

But in order to do this, the ContextFactory needs to interpret the 
URI.   So it needs to somehow
map it to a data source and check whether that source is in a format 
that the factory understands.
The act of creating am unopened Context object (which simply involves 
copying the URI and metadata into
an instance) seems trivial, compared to that.


Jim Sermersheim wrote:
> I believe we added isCreatable (I called it canCreate) so that one can

> determine (given a ContextRef) which factories are capable of 
> producing a Context for it (allows one to discover and choose from the

> capable factories). The overhead of actually creating the context may 
> warrant the canCreate() method.
>  
> Jim
>
> >>> Greg Byrd <gbyrd@xxxxxxxx> 7/27/06 5:51 PM >>>
>
> Yes, I should have put isOpenable on the Context, not the
ContextFactory.
>
> So, isCreatable(ContextRef) would be TRUE if the ContextFactory knows
> how to resolve the URI to a data source, and if it can determine that
> the underlying datatype is one that it can interpret.  Does that seem
> correct?
>
> Actually, wouldn't it be just as simple to just throw an exception on
> createContext(ContextRef) if it can't resolve or support the data
> format?  I don't know why someone would call isCreatable unless they
> were planning to create, and checking first would cause the factory to
> do the resolution and format checking twice (once for the test, once
for
> the creation).
>
> ...Greg
>
>
>
> Jim Sermersheim wrote:
> > Question on IContextFactory.isOpenable(contextRef, identity)
> > 
> > I remember having the discussion where we thought it would be good
to
> > allow the identity to be passed to a function which tests whether a
> > context is currently open with a specified identity. I don't
remember
> > us talking about passing the identity to isOpenable here though.
> > 
> > Actually, with the changes, I expected this method to be called
> > isCreatable(contextRef). Since the role of opening is on IContext
now,
> > the factory can't know whether it's openable given a specified
identity.
> > 
> > Jim
> >
> > >>> Greg Byrd <gbyrd@xxxxxxxx> 7/27/06 3:33 PM >>>
> >
> > I modified the list of IdAS methods (Working Draft 0.4) and uploaded
it
> > to the IdAS wiki page.  I will continue to make edits to the page
over
> > the next few days.  I believe this incorporates today's discussion,
as
> > well as other smaller changes to the API from the last few weeks. 
As
> > always, feel free to question and critique.
> >
> > http://spwiki.editme.com/IdentityAttributeService
> >
> > ...Greg
> >
> > _______________________________________________
> > higgins-dev mailing list
> > higgins-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/higgins-dev
> >
------------------------------------------------------------------------
> >
> > _______________________________________________
> > higgins-dev mailing list
> > higgins-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/higgins-dev
> >  
>
> _______________________________________________
> higgins-dev mailing list
> higgins-dev@xxxxxxxxxxx
> https://dev.eclipse .org/mailman/listinfo/higgins 
> <https://dev.eclipse.org/mailman/listinfo/higgins>-dev
>
------------------------------------------------------------------------
>
> _______________________________________________
> higgins-dev mailing list
> higgins-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/higgins-dev
>   

_______________________________________________
higgins-dev mailing list
higgins-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/higgins-dev



Back to the top