Package org.jcsp.net2.mobile
Class MobileChannelOutput
java.lang.Object
org.jcsp.net2.mobile.MobileChannelOutput
- All Implemented Interfaces:
Serializable
,ChannelOutput
,Poisonable
,NetChannelOutput
,Networked
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoid
asyncWrite
(Object obj) Sends a message to the input end of the channel asynchronously (no blocking)void
destroy()
Destroys the Networked constructGets the networked location of the Networked constructvoid
poison
(int strength) This injects poison into the channel.private void
readObject
(ObjectInputStream input) void
setEncoder
(NetworkMessageFilter.FilterTx encoder) Sets the underlying encoder for the channelvoid
Write an Object to the channel.private void
writeObject
(ObjectOutputStream output)
-
Field Details
-
msgBoxLocation
-
actualOut
-
-
Constructor Details
-
MobileChannelOutput
-
MobileChannelOutput
-
-
Method Details
-
write
Description copied from interface:ChannelOutput
Write an Object to the channel.- Specified by:
write
in interfaceChannelOutput
- Parameters:
object
- the object to write to the channel
-
destroy
public void destroy()Description copied from interface:Networked
Destroys the Networked construct -
getLocation
Description copied from interface:Networked
Gets the networked location of the Networked construct- Specified by:
getLocation
in interfaceNetworked
- Returns:
- The location of the construct
-
poison
public void poison(int strength) Description copied from interface:Poisonable
This injects poison into the channel. If the channel was not explicitly constructed to be poisonable or if the strength of poison is not greater than the channel immunity level, the poison will have no effect.- Specified by:
poison
in interfacePoisonable
- Parameters:
strength
- the strength of the poison (must be >= 0).
-
asyncWrite
Description copied from interface:NetChannelOutput
Sends a message to the input end of the channel asynchronously (no blocking)- Specified by:
asyncWrite
in interfaceNetChannelOutput
- 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
Description copied from interface:NetChannelOutput
Sets the underlying encoder for the channel- Specified by:
setEncoder
in interfaceNetChannelOutput
- Parameters:
encoder
- The encoder to use for the channel.
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
IOException
ClassNotFoundException
-