Dear list members,
The JCSP library is nice. However, for my purposes there is too much
package protected. Is this for some reason?
I am creating a special CSProcess, let I call it an Interpreter. The
Interpreter is decoupled from the application functionality (e.g. it
does have several processes in an array). The Interpreter may take care
of other non-functional aspects:
* Scheduling: The ParallelInterpreter does have a run() method
that calls all its processes in a Parallel construct. Other
interpreters may implement all kind of pool policies. The
Interpreter can be called a Pool in this scenario;
* Coupling: Instead of containing an CSProcess array, the
interpreter may access a pool where processes swim around. It
can take one that performs fast of about which it has positive
experiences;
* Process manipulation: An Interpreter may consider its processes
and combine them too one new process, before running it:
Transforming channels to (variable) assignments within the same
namespace;
To create an Interpreter I want to have ChannelInput's and
ChannelOutput's that carry CSProcess instances. Let I call them
ChannelProcInput's and ChannelProcOutput's. So, the
One2OneProcChannelImpl should implement ChannelProcInput,
ChannelProcOutput and One2OneProcChannel. The methods to overwrite are
only in() and out():
public ChannelProcInput in() { return this(); }
public ChannelProcOutput out() { return this(); } //and read, write
Regretfully One2OneChannelImpl is package-protected, so I can't extend
it. Neither can I copy its code, because the method schedule of the
Alternative class is not visible either.