Package org.jcsp.lang
Class Any2OneImpl<T>
- java.lang.Object
-
- org.jcsp.lang.Any2OneImpl<T>
-
- All Implemented Interfaces:
Any2OneChannel<T>,ChannelInternals<T>
- Direct Known Subclasses:
Any2OneChannelImpl,BufferedAny2OneChannel,PoisonableAny2OneChannelImpl,PoisonableBufferedAny2OneChannel
class Any2OneImpl<T> extends java.lang.Object implements ChannelInternals<T>, Any2OneChannel<T>
-
-
Field Summary
Fields Modifier and Type Field Description private ChannelInternals<T>channelprivate java.lang.ObjectwriteMonitor
-
Constructor Summary
Constructors Constructor Description Any2OneImpl(ChannelInternals<T> _channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendRead()AltingChannelInput<T>in()Returns the input end of the channel.SharedChannelOutput<T>out()Returns the output end of the channel.Tread()booleanreaderDisable()booleanreaderEnable(Alternative alt)booleanreaderPending()voidreaderPoison(int strength)TstartRead()voidwrite(T obj)voidwriterPoison(int strength)
-
-
-
Field Detail
-
channel
private ChannelInternals<T> channel
-
writeMonitor
private final java.lang.Object writeMonitor
-
-
Constructor Detail
-
Any2OneImpl
Any2OneImpl(ChannelInternals<T> _channel)
-
-
Method Detail
-
endRead
public void endRead()
- Specified by:
endReadin interfaceChannelInternals<T>
-
read
public T read()
- Specified by:
readin interfaceChannelInternals<T>
-
readerDisable
public boolean readerDisable()
- Specified by:
readerDisablein interfaceChannelInternals<T>
-
readerEnable
public boolean readerEnable(Alternative alt)
- Specified by:
readerEnablein interfaceChannelInternals<T>
-
readerPending
public boolean readerPending()
- Specified by:
readerPendingin interfaceChannelInternals<T>
-
readerPoison
public void readerPoison(int strength)
- Specified by:
readerPoisonin interfaceChannelInternals<T>
-
startRead
public T startRead()
- Specified by:
startReadin interfaceChannelInternals<T>
-
write
public void write(T obj)
- Specified by:
writein interfaceChannelInternals<T>
-
writerPoison
public void writerPoison(int strength)
- Specified by:
writerPoisonin interfaceChannelInternals<T>
-
in
public AltingChannelInput<T> in()
Description copied from interface:Any2OneChannelReturns the input end of the channel.- Specified by:
inin interfaceAny2OneChannel<T>
-
out
public SharedChannelOutput<T> out()
Description copied from interface:Any2OneChannelReturns the output end of the channel.- Specified by:
outin interfaceAny2OneChannel<T>
-
-