Hello Anton,
> 1.
>
> If I'm not mistake 'prototype' design pattern is about having
> a prototype object and cloning it when necessary?
right.
Thanks for your suggestions. I'll explain you the target (but plan for
futur) :
> DB> // generate sub-queue by clone a prototype (design pattern) queue
> DB> public class QueueCompositeM implements Queue {
> DB> ...
> DB> }
>
> DB> <stage>
> DB> <queue class="QueueCompositeM">
> DB> <prototype class="QueueImplA"/>
> DB> </queue>
> DB> </stage>
> DB> or
> DB> <stage>
> DB> <queue class="QueueCompositeM">
> DB> <prototype class="QueueDecoratorX">
> DB> <queue class="QueueImplA"/>
> DB> </prototype>
> DB> </queue>
> DB> </stage>
means :
* Queue is an interface for component
* Queue are several implementation QueueImplA, QueueImplB,...
* Queue component could be make by decoration of other Queue component (of any type:
implementation, decorator, composite,...)
* Queue could be make by composition
In my case the composition work like this :
* stage access the compositeQueue like if it was one Queue
* the compositeQueue use internaly several subQueue to manage message/event
* the disptaching of an input message to a subQueue is done via the value of one
attribute's message
* the compositeQueue could create (like Pool) subQueue when needed and creation of all
subQueue follow the save way and have the same configuration
* each subQueue have its own state (could be suspended, empty)
* each subQueue could be managead/monitored by external application
All those target implied that preprocessing isn't a solution because :
* subQueue are create on demand, and the list isn't known at start time
* subQueue could be any type of Queue (I could have a compositeQueue of compositeQueue
(on other attribute),...)
But my approach is too dynamic for my current business context, so compositeQueue
concept is suspended.
Thanks for your time and explications.
--
--------------------------------------------------------------
David "Dwayne" Bernard Freelance Developer (Java)
mailto:[EMAIL PROTECTED]
\|/ http://dwayne.java-fan.com
--o0O @.@ O0o-------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]