SSF.OS.BGP4.Comm
Class TransportMessage

java.lang.Object
  |
  +--SSF.OS.ProtocolMessage
        |
        +--SSF.OS.BGP4.Comm.Message
              |
              +--SSF.OS.BGP4.Comm.TransportMessage
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class TransportMessage
extends Message

A BGP transport message. It is used internally by BGP to indicate when transport events occur, such as sockets being opened or closed.

See Also:
Serialized Form

Field Summary
 java.lang.String nh
          The NHI prefix of the neighbor/peer with whom this transport message is associated.
 tcpSocket sock
          The specific socket to which this transport message applies, if any.
 int trans_type
          Indicates the type of transport message.
 
Fields inherited from class SSF.OS.BGP4.Comm.Message
KEEPALIVE, NOTICEUPDATE, NOTIFICATION, OCTETS_IN_HEADER, OPEN, RUN, STARTSTOP, TIMEOUT, TRANSPORT, typ, typeNames, UPDATE, version
 
Constructor Summary
TransportMessage()
          Empty constructor.
TransportMessage(int t, java.lang.String nhipre, tcpSocket s)
          Constructs a transport message given a type code and peer NHI prefix.
 
Method Summary
 void readExternal(java.io.ObjectInput in)
          Reads the contents of this object from a serialization stream.
 void writeExternal(java.io.ObjectOutput out)
          Writes the contents of this object to a serialization stream.
 
Methods inherited from class SSF.OS.BGP4.Comm.Message
body_bytecount, bytecount, header_bytecount, toString, type2str, version
 
Methods inherited from class SSF.OS.ProtocolMessage
carryPayload, copy, dropHeader, dropPayload, frombytes, fromVersion, payload, previous, size, tobytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

trans_type

public int trans_type
Indicates the type of transport message. Possible values corresponding to "open", "close", "open fail", and "fatal error" are enumerated in BGPSession.


nh

public java.lang.String nh
The NHI prefix of the neighbor/peer with whom this transport message is associated.


sock

public tcpSocket sock
The specific socket to which this transport message applies, if any.

Constructor Detail

TransportMessage

public TransportMessage()
Empty constructor. Used to deserialize this object.


TransportMessage

public TransportMessage(int t,
                        java.lang.String nhipre,
                        tcpSocket s)
Constructs a transport message given a type code and peer NHI prefix.

Parameters:
t - The type of the transport message.
nhipre - The NHI prefix of the neighbor/peer to whom this message applies.
Method Detail

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Writes the contents of this object to a serialization stream.

Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class Message
Throws:
java.io.IOException - if there's an error writing the data

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Reads the contents of this object from a serialization stream.

Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class Message
Throws:
java.io.IOException - if there's an error reading in the data
java.lang.ClassNotFoundException - if a class name is unrecognized