Package org.jcsp.net2
Interface NetChannelOutput<T>
-
- All Superinterfaces:
ChannelOutput<T>
,Networked
,Poisonable
- All Known Subinterfaces:
NetSharedChannelOutput<T>
- All Known Implementing Classes:
MobileChannelOutput
public interface NetChannelOutput<T> extends ChannelOutput<T>, Networked
An interface defining a ChannelOutput that is networked. For information on how to an object of this type, see ChannelOutput. For information on how to create a NetChannelOutput, see the the relevant factory.The only method that this interface defines is asyncSend. This is considered a dangerous method to use, and careful consideration must be taken. The inclusion of asyncSend is to provide the impression of a simple infinitely buffered networked channel, without having to create extra buffers beyond what the channel uses.
- Author:
- Kevin Chalmers (updated from Quickstone Technologies)
- See Also:
ChannelOutput
,Networked
,NetChannel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
asyncWrite(T obj)
Sends a message to the input end of the channel asynchronously (no blocking)void
setEncoder(NetworkMessageFilter.FilterTx encoder)
Sets the underlying encoder for the channel-
Methods inherited from interface org.jcsp.lang.ChannelOutput
write
-
Methods inherited from interface org.jcsp.net2.Networked
destroy, getLocation
-
Methods inherited from interface org.jcsp.lang.Poisonable
poison
-
-
-
-
Method Detail
-
asyncWrite
void asyncWrite(T obj) throws JCSPNetworkException, NetworkPoisonException
Sends a message to the input end of the channel asynchronously (no blocking)- Parameters:
obj
- The object to send to the input end- Throws:
JCSPNetworkException
- Thrown if something goes wrong in the underlying architectureNetworkPoisonException
- Thrown if the channel is poisoned
-
setEncoder
void setEncoder(NetworkMessageFilter.FilterTx encoder)
Sets the underlying encoder for the channel- Parameters:
encoder
- The encoder to use for the channel.
-
-