Leo:

Have been browsing around inside the proposal src tree of Avalon and Phoenix
in an attempt to locate an interface against which a
LifecycleConflictException could be thrown - i.e. an exception that refused
to do something based on the grounds that the object does not support the
necessary set of required interface patterns (i.e. to suspend one must be
able to resume). Not knowing the code all that well - I haven't locating an
appropriate target - perhaps someone else knows where I should be looking.

In the meantime, I did take a look at the Embeddor interface in
org.apache.phoenix.core.  I think this should be modified to include
Stoppable in the inheritance path of the interface because it currently
includes Disposable and according to the limited documentation on
Disposable, the dispose operation can only be disposed of following the
stopping of the class - i.e. it is implied that Embeddor is Stoppable by
that fact that it is Disposable.  If this is incorrect then the
documentation for Disposable is out-of-date.

Cheers, Steve.


Earlier, I wrote:
> > 4) Suspend / Resume. It seems to me that any object that supports
> > suspend() should support resume() as well. This is not reflected
> > in the interfaces. Is there a reason for this?
>
> Have thought about this in terms of both Suspendable/Resumable and
> Startable/Stoppable.  My impression is that the notions of starting
> and stopping should occur under a single interface - i.e. a pair -
> one should not be allow a component to start if it does not implement
> the contract to stop, and the interface Disposable should extend
> Stoppable.  Equally, one should not suspend an object that cannot
> resume.
>
[snip interface stuff]
>
> Without the above, we have to document that something else (a manager)
> is responsible for ensuring that a component implements interface
> pairs - i.e. if a component declares that it is Startable, a manager
> has to ensure that the component is stoppable - if not stoppable then
> the manager should not start it.  The same applies for Suspendable -
> if a component declares it is Suspendable, the manager should not
> suspend it unless it also declares that it is Resumable.
>
> Cheers, Steve.


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

Reply via email to