public final class MobileChannelInput extends java.lang.Object implements NetChannelInput, java.io.Serializable
| Constructor and Description |
|---|
MobileChannelInput() |
MobileChannelInput(NetworkMessageFilter.FilterTx encoder,
NetworkMessageFilter.FilterRx decoder) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys the Networked construct
|
void |
endRead()
End an extended rendezvous.
|
NetLocation |
getLocation()
Gets the networked location of the Networked construct
|
void |
poison(int strength)
This injects poison into the channel.
|
java.lang.Object |
read()
Read an Object from the channel.
|
void |
setDecoder(NetworkMessageFilter.FilterRx decoder)
Sets the underlying decoder for the channel
|
java.lang.Object |
startRead()
Begin an extended rendezvous read from the channel.
|
public MobileChannelInput()
public MobileChannelInput(NetworkMessageFilter.FilterTx encoder, NetworkMessageFilter.FilterRx decoder)
public void endRead()
ChannelInputstartRead.endRead in interface ChannelInputpublic java.lang.Object read()
ChannelInputread in interface ChannelInputpublic java.lang.Object startRead()
ChannelInputendRead.
Only then will the writer be released (from its
write method).
The writer is unaware of the extended nature of the communication.
The reader process must call
at some point after this function, otherwise the writer will not
be freed and deadlock will probably follow.
endRead
The reader process may perform any actions between calling
and
startRead, including communications
on other channels. Further communications on this channel, of course,
should not be made.
endRead
An extended rendezvous may be started after the channel's Guard
has been selected by an Alternative (i.e.
instead of
startRead).read
startRead in interface ChannelInputpublic void poison(int strength)
Poisonablepoison in interface Poisonablestrength - the strength of the poison (must be >= 0).public void destroy()
Networkedpublic NetLocation getLocation()
NetworkedgetLocation in interface Networkedpublic void setDecoder(NetworkMessageFilter.FilterRx decoder)
NetChannelInputsetDecoder in interface NetChannelInputdecoder - The new decoder to use.Copyright © 1996–2019. All rights reserved.