Boeing Simulation 3.1 API Specification

connect.socket
Class SocketSupplierChannel

java.lang.Object
  |
  +--connect.socket.SocketSupplierChannel
All Implemented Interfaces:
SupplierChannel

public class SocketSupplierChannel
extends Object
implements SupplierChannel


Field Summary
private  ObjectOutputStream oos
           
private static long serialVersionUID
           
 
Constructor Summary
SocketSupplierChannel(OutputStream os)
           
 
Method Summary
 void close()
          Closes this channel.
 void writeObject(Object obj)
          So we decided to massively simply the interface here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

oos

private final ObjectOutputStream oos
Constructor Detail

SocketSupplierChannel

public SocketSupplierChannel(OutputStream os)
Method Detail

close

public void close()
           throws IOException
Description copied from interface: SupplierChannel
Closes this channel.

Specified by:
close in interface SupplierChannel
IOException

writeObject

public void writeObject(Object obj)
                 throws IOException
So we decided to massively simply the interface here. Now one may write objects and only objects. Need to write an int? Tough. Write an integer instead. In order to appease the Jurgens, this method will auto-flush and reset the stream to make sure all your objects get send across the wire. Note that this method was made synchronized so that multiple threads may write on the stream. Although this induces a potential wait time for the lock to be released, the current implementations of socket based components do not have time constraints on writing objects.

Specified by:
writeObject in interface SupplierChannel
IOException

Boeing Simulation 3.1 API Specification

To submit a bug or feature email the author of that class. Funding for this research was provided by Boeing and DARPA.