Boeing Simulation 3.1 API Specification

connect.socket
Class SocketConnection

java.lang.Object
  |
  +--connect.socket.SocketConnection
All Implemented Interfaces:
CreatesConnection, Serializable

public class SocketConnection
extends Object
implements CreatesConnection, Serializable

The SocketConnection class is designed to connect two components over a socket layer. The socket I/O streams are hidden within the Consumer and Supplier Channel interfaces.

See Also:
Serialized Form

Field Summary
private  String host
           
private  int port
           
private static long serialVersionUID
           
private  Class type
           
 
Constructor Summary
SocketConnection(Class type, String hostName, int portNumber)
           
 
Method Summary
 connect.ChannelBundle connect(connect.ComponentEmissary requesting)
          Connect the clientComponent to the host via a socket stream.
 Class getHostType()
          Return the type of component that this CreatesConnection is hooked up to.
private  void readObject(ObjectInputStream in)
           
 String toString()
           
private  void writeObject(ObjectOutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

type

private Class type

host

private String host

port

private int port
Constructor Detail

SocketConnection

public SocketConnection(Class type,
                        String hostName,
                        int portNumber)
Method Detail

connect

public connect.ChannelBundle connect(connect.ComponentEmissary requesting)
                              throws ConnectionRejectedException
Connect the clientComponent to the host via a socket stream.

Specified by:
connect in interface CreatesConnection
ConnectionRejectedException

getHostType

public Class getHostType()
Description copied from interface: CreatesConnection
Return the type of component that this CreatesConnection is hooked up to.

Specified by:
getHostType in interface CreatesConnection

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
IOException
ClassNotFoundException

toString

public String toString()
Overrides:
toString in class Object

writeObject

private void writeObject(ObjectOutputStream out)
                  throws IOException
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.