There are fifteen different object types. Again, they have a well defined format (figure
). The type of the object is specified in the header via two fields: Class-Num identifying the object class (the different classes are Null, Session, Rsvp_Hop, Time_Values, Style, Flowspec, Filter_Spec, Sender_Template, Sender_Tspec, Adspec, Error_Spec, Policy_Data, Integrity, Scope and Resv_Confirm), and C-Type defining the type within the class (e.g. it can be used to differentiate an IPv4 object and an IPv6 object).
Therefore, the structure of RSVP messages is particularly adapted to an organisation with objects, using inheritance. The organisation decided is shown in figure
. The Null object, which does not represent anything and will be ignored by the RSVP process, does not need to be implemented and, as said before, the Policy_Data object is not defined yet.
There is a subset of objects which describe the QoS of reservations. The meaning of these objects is explained in RFC 2215 [#!RFC2215!#] and the format of their contents is described in RFC 2210 [#!RFC2210!#]: they are composed of a header and several services, each service being composed of a per-service data header and of several parameters, and the parameters have a header followed by their contents. The objects describing the requested QoS derive from a particular class called RsvpSpecObject, which is a subclass of RsvpObject.
Every object derives from the RsvpObject abstract class. This class uses the class RsvpObjectHeader to manipulate the header of each object. The particularity of each object is then handled in its own class. A class handling an RSVP object can be seen in appendix
.
The most important methods are those which transform the object into a series of bytes, and vice versa. In order to achieve this in an elegant way, two classes have been implemented. ExtByteArrayInputStream and ExtByteArrayOutputStream provide methods to read and write the contents of the packages to and from a raw form. Those classes are subclasses of ByteArrayInputStream and ByteArrayOutputStream, respectively.