class Any2NetChannel extends java.lang.Object implements NetSharedChannelOutput, java.io.Serializable
Note that this is merely a thread-safe wrapper around
One2NetChannel
One2NetChannel| Modifier and Type | Field and Description |
|---|---|
private One2NetChannel |
impl
Implementation
|
| Constructor and Description |
|---|
Any2NetChannel(NetChannelLocation channelLocation)
Equivalent to the
(NetChannelLocation) constructor of
One2NetChannel. |
Any2NetChannel(NetChannelLocation channelLocation,
boolean acknowledged)
Equivalent to the
(NetChannelLocation, boolean) constructor
of One2NetChannel. |
Any2NetChannel(NetChannelLocation channelLocation,
boolean acknowledged,
Profile linkProfile)
Equivalent to the
(NetChannelLocation, boolean, Profile)
constructor of One2NetChannel. |
Any2NetChannel(NetChannelLocation channelLocation,
Profile linkProfile)
Equivalent to the
(NetChannelLocation, Profile) constructor
of One2NetChannel. |
| Modifier and Type | Method and Description |
|---|---|
void |
destroyWriter()
Destroys the write end of a channel and frees any resources
used within the JCSP networking infrastructure.
|
NetChannelLocation |
getChannelLocation()
Public accessor for obtaining the location of the read
end of this channel.
|
java.lang.Class |
getFactoryClass()
Returns the factory class used for constructing this channel
end object.
|
void |
poison(int strength)
Currently, network channels are unpoisonable so this method has no effect.
|
void |
recreate()
Requests that the channel recreates itself and reconnects to the
other end of the channel.
|
void |
recreate(NetChannelLocation loc)
Requests that the channel recreates itself and reconnects
to the other end of the channel.
|
void |
write(java.lang.Object data)
Output data to this channel.
|
private One2NetChannel impl
public Any2NetChannel(NetChannelLocation channelLocation)
(NetChannelLocation) constructor of
One2NetChannel.One2NetChannelpublic Any2NetChannel(NetChannelLocation channelLocation, boolean acknowledged)
(NetChannelLocation, boolean) constructor
of One2NetChannel.One2NetChannelpublic Any2NetChannel(NetChannelLocation channelLocation, Profile linkProfile)
(NetChannelLocation, Profile) constructor
of One2NetChannel.One2NetChannelpublic Any2NetChannel(NetChannelLocation channelLocation, boolean acknowledged, Profile linkProfile)
(NetChannelLocation, boolean, Profile)
constructor of One2NetChannel.One2NetChannelpublic void write(java.lang.Object data)
Note that this is merely a thread-safe wrapper around
One2NetChannel.write(Object) - see that method for full
documentation.
write in interface ChannelOutputdata - The data to send over the channel. The object should implement the Serializable interface in order to be sent over a network.public NetChannelLocation getChannelLocation()
getChannelLocation in interface NetworkedNetChannelLocation object containing
information needed to connect topublic void recreate()
recreate in interface NetChannelOutputpublic void recreate(NetChannelLocation loc)
recreate in interface NetChannelOutputloc - the new location of the reader.public void destroyWriter()
destroyWriter in interface NetChannelOutputpublic java.lang.Class getFactoryClass()
NetChannelOutputReturns the factory class used for constructing this channel end object.
getFactoryClass in interface NetChannelOutputClass of thepublic void poison(int strength)
poison in interface Poisonablestrength - the strength of the poison (must be >= 0).