public final class MobileChannelOutput extends Object implements NetChannelOutput, Serializable
Constructor and Description |
---|
MobileChannelOutput(NetChannelLocation loc) |
MobileChannelOutput(NetChannelLocation loc,
NetworkMessageFilter.FilterTx encoder) |
Modifier and Type | Method and Description |
---|---|
void |
asyncWrite(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(Object object)
Write an Object to the channel.
|
public MobileChannelOutput(NetChannelLocation loc)
public MobileChannelOutput(NetChannelLocation loc, NetworkMessageFilter.FilterTx encoder)
public void write(Object object)
ChannelOutput
write
in interface ChannelOutput
object
- the object to write to the channelpublic void destroy()
Networked
public NetLocation getLocation()
Networked
getLocation
in interface Networked
public void poison(int strength)
Poisonable
poison
in interface Poisonable
strength
- the strength of the poison (must be >= 0).public void asyncWrite(Object obj) throws JCSPNetworkException, NetworkPoisonException
NetChannelOutput
asyncWrite
in interface NetChannelOutput
obj
- 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)
NetChannelOutput
setEncoder
in interface NetChannelOutput
encoder
- The encoder to use for the channel.Copyright © 1996–2016. All rights reserved.