public final class MobileChannelOutput extends java.lang.Object implements NetChannelOutput, java.io.Serializable
| Constructor and Description |
|---|
MobileChannelOutput(NetChannelLocation loc) |
MobileChannelOutput(NetChannelLocation loc,
NetworkMessageFilter.FilterTx encoder) |
| Modifier and Type | Method and Description |
|---|---|
void |
asyncWrite(java.lang.Object obj)
Sends a message to the input end of the channel asynchronously (no blocking)
|
void |
destroy()
Destroys the Networked construct
|
NetLocation |
getLocation()
Gets the networked location of the Networked construct
|
void |
poison(int strength)
This injects poison into the channel.
|
void |
setEncoder(NetworkMessageFilter.FilterTx encoder)
Sets the underlying encoder for the channel
|
void |
write(java.lang.Object object)
Write an Object to the channel.
|
public MobileChannelOutput(NetChannelLocation loc)
public MobileChannelOutput(NetChannelLocation loc, NetworkMessageFilter.FilterTx encoder)
public void write(java.lang.Object object)
ChannelOutputwrite in interface ChannelOutputobject - the object to write to the channelpublic void destroy()
Networkedpublic NetLocation getLocation()
NetworkedgetLocation in interface Networkedpublic void poison(int strength)
Poisonablepoison in interface Poisonablestrength - the strength of the poison (must be >= 0).public void asyncWrite(java.lang.Object obj)
throws JCSPNetworkException,
NetworkPoisonException
NetChannelOutputasyncWrite in interface NetChannelOutputobj - The object to send to the input endJCSPNetworkException - Thrown if something goes wrong in the underlying architectureNetworkPoisonException - Thrown if the channel is poisonedpublic void setEncoder(NetworkMessageFilter.FilterTx encoder)
NetChannelOutputsetEncoder in interface NetChannelOutputencoder - The encoder to use for the channel.Copyright © 1996–2019. All rights reserved.