How does this service design work with services that are implemented as a
singleton? Would you treat the actual service implementation as a proxy
object which can maintain state and then hands the request to the singleton
service when execute is called?

----- Original Message -----
From: Brett McLaughlin <[EMAIL PROTECTED]>
To: Turbine <[EMAIL PROTECTED]>
Sent: Wednesday, January 26, 2000 1:56 PM
Subject: Re: [PROPOSAL] Service model re-design


>
>
> Dave 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); file://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.
>
> Bingo.
> >
> > Service user - No brainer. service.init(o) - service.execute() ...
> > later!
>
> Bingo, part deux.  Right on ;-)
>
> -Brett
> >
> > On track?
> > dave
> >
> > ------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Problems?:           [EMAIL PROTECTED]
>
>
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to