--- Dave <[EMAIL PROTECTED]> wrote:
>
>
> Brett McLaughlin wrote:
>
> > I am a bit torn on:
> >
> > public void set(Object ob);
> >
> > -or-
> >
> > public void add(Object ob);
> >
> > If you can come up with 3 cases of services where
> that would be used, I
> > am OK with adding it in. That is my benchmark; if
> there are 3 times it
> > can be used, it makes sense to add it; less than
> that it is too specific
> > to be in a generic contract. add() could also be
> your update, as you
> > check for a name/id of an event and either
> add/update.
> >
>
> I know of at least 2 off the top of my head :
> Scheduler, GlobalCache.
> Someone else know a
> third?
>
> So to this point, this is kinda what it may look
> like -
>
> public interface Service {
>
> public void setName(String name);
>
> public String getName();
>
> public void init(Object ob);
>
> public Object get();
>
> public void set(Object ob); //I can do an ADD and
> UPDATE here if
> needed
>
> public void release(Object ob);
>
> public boolean execute() throws ServiceException;
>
> public void destroy();
>
> }
>
> It's getting closer. Here's what I see -
>
> Service developer - Low level. Gotta think about it.
> what's a get, set,
> release, execute, etc... mean
> to my service and how does my service fit that mold.
>
> Service user - No brainer. service.init(o) -
> service.execute() ...
> later!
>
>
> On track?
> dave
>
Brett, you could consider putting any addded methods
in a separate interface keeping a thin design with the
first. Might be cases where execute won't be useful.
Regards, george
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]