The service-points only allow a service to implement 1 interface.  However,
there are times when it seems like it would be useful to specify that your
service implements more than one inteface as in the description below.
Hivemind hasn't been implemented that way, so I am sure there are keys
reason why not so I was just wondering what was the thought process behind
it?


Example:

interface Add {
  public void add(int arg0, int arg1);
}

interface Startable {
  public void startup() throws Exception;
}

interface Stopable {
  public void shutdown() throws Exception;
}

=====

  <service-point id="Adder" interface="hivemind.examples.Addable">
        <create-instance class="hivemind.examples.impl.AdderImpl"/>
  </service-point>

...

  <contribution configuration-id="Startup">
    <task title="Adder"  order="100" >
        <invoke-startup service-id="hivemind.examples.Adder" />
    </task>
  </contribution>

  <contribution configuration-id="Startup">
    <task title="Adder"  order="1000" >
        <invoke-shutdown service-id="hivemind.examples.Adder" />
    </task>
  </contribution>

=====

You have an Adder service that implements Addable.  You'd like to be able to
contribute this to a "Startup" service or a "Shutdown".  However, you don't
want to make all Addable services have to implement either/both of the
Startable or Stopable interfaces. (In this case I am expanding "Panorama
Startup" example).  Are there ways to do this without the Adder service
implementing multiple interfaces and without combining all the methods into
1 interface?)

-Randy




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to