Channel
Base type abstracting a channel of communication of T-typed elements between a it.unibo.tuprolog.solve.Solver and the outside world, without committing to a specific transport.
This is what lets Prolog built-ins like write/1, read/1, or warning reporting talk to the outside world uniformly whether the solver runs on the JVM (wrapping a java.io.PrintStream/Reader/Writer) or on JS (wrapping console.log), since a built-in only ever depends on this abstraction, never on a concrete transport. See InputChannel and OutputChannel for the two directions of communication, and it.unibo.tuprolog.solve.channel.ChannelStore for how several named channels are held together by a solver.
Every element transiting the channel (via InputChannel.read/OutputChannel.write) is broadcast to every registered Listener.
Inheritors
Properties
The Prolog $stream(Direction, Id)-like Struct term identifying this channel, e.g. for current_output/1.
Functions
Registers listener to be invoked with every element subsequently transiting this channel.
Unregisters every currently-registered Listener.
Unregisters listener, previously added via addListener.