public class PipedChannel extends SemaphoreControlledChannel
IO Exceptions are transformed into Errors. This is in general not a good idea, but seems to be the most reasonable compromise for the intended usage contexts.
Status Uncertain. There are enough conceptual and implementation snags surrounding use of pipes as Channels to downplay use. However, without such bridges, people would have to duplicate code that should work the same way in both cases.
Modifier and Type | Field and Description |
---|---|
protected java.io.ObjectInputStream |
in_ |
protected java.io.PipedInputStream |
inp_ |
protected java.io.ObjectOutputStream |
out_ |
protected java.io.PipedOutputStream |
outp_ |
capacity_, putGuard_, takeGuard_
Constructor and Description |
---|
PipedChannel() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
extract()
Shared mechanics for take-based methods
|
protected java.io.ObjectInputStream |
in()
Return input stream, first constructing if necessary.
|
protected void |
insert(java.lang.Object x)
Shared mechanics for put-based methods
|
protected java.io.ObjectOutputStream |
out()
Return output stream, first constructing if necessary.
|
java.lang.Object |
peek()
Stubbed out for now
|
protected java.io.ObjectInputStream in_
protected java.io.ObjectOutputStream out_
protected final java.io.PipedOutputStream outp_
protected final java.io.PipedInputStream inp_
protected java.io.ObjectInputStream in()
protected java.io.ObjectOutputStream out()
protected void insert(java.lang.Object x)
insert
in class SemaphoreControlledChannel
protected java.lang.Object extract()
extract
in class SemaphoreControlledChannel
public java.lang.Object peek()