All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.nodeos.pj_UDPLayer
java.lang.Object
   |
   +----edu.utah.janos.nodeos.pj_ProtocolLayer
           |
           +----edu.utah.janos.nodeos.pj_UDPLayer

  Summary

class  pj_UDPLayer
     extends edu.utah.janos.nodeos.pj_ProtocolLayer
{
          // Fields 3
     private final DatagramPacket dp;
     private final DatagramSocket ds;
     private final Hashtable sockets;

          // Constructors 1
     pj_UDPLayer() throws SocketException;

          // Methods 11
     void attachGenerator(PacketGenerator);
     void attachHandler(PacketHandler) throws IOException;
     AddressSpec createAddress(String) throws PacketAddressFormatException;
     PacketAddressMask createAddressMask();
     void detachGenerator(PacketGenerator);
     void detachHandler(PacketHandler);
     void generatorReady(PacketGenerator);
     String getID();
     int getPacketLength();
     void synchronousSend(PacketGenerator, pj_BufferHandle);
     public String toString();

          // Inner Classes 1
     private static class pj_UDPLayer.SocketReader
}

UDPLayer is a protocol layer implementation that runs over UDP.

Author:
Janos Ministry of Development




  Fields

· dp

Summary  |  Top

   private final DatagramPacket dp

Datgram wrapper for sending packets. The stupid empty buffer is replaced with the pj_BufferHandle's buffer right before the send.


· ds

Summary  |  Top
   private final DatagramSocket ds

Output UDP socket for sending packets.


· sockets

Summary  |  Top
   private final Hashtable sockets

The table of sockets that we have open for reading, organized by port number.


  Constructors

· pj_UDPLayer

Summary  |  Top

   pj_UDPLayer()  throws SocketException


  Methods

· toString

Summary  |  Top
   public String toString() 
Overrides:
toString in class Object


· getID

Summary  |  Top
   String getID() 
Overrides:
getID in class pj_ProtocolLayer


· getPacketLength

Summary  |  Top
   int getPacketLength() 
Overrides:
getPacketLength in class pj_ProtocolLayer


· createAddress

Summary  |  Top
   AddressSpec createAddress(String addr)  throws PacketAddressFormatException
Overrides:
createAddress in class pj_ProtocolLayer


· createAddressMask

Summary  |  Top
   PacketAddressMask createAddressMask() 
Overrides:
createAddressMask in class pj_ProtocolLayer


· attachHandler

Summary  |  Top
   void attachHandler(PacketHandler ph)  throws IOException


· detachHandler

Summary  |  Top
   void detachHandler(PacketHandler ph) 


· attachGenerator

Summary  |  Top
   void attachGenerator(PacketGenerator pg) 


· synchronousSend

Summary  |  Top
   void synchronousSend(PacketGenerator pg, 
                        pj_BufferHandle bh) 

Synchronous send a packet, blocking until the send completes.



· generatorReady

Summary  |  Top
   void generatorReady(PacketGenerator pg) 

Signal to UDP layer that asynchronous packets are available. We just do a synchronous send. :)



· detachGenerator

Summary  |  Top
   void detachGenerator(PacketGenerator pg) 


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7