SSF.OS.UDP
Class udpSessionMaster

java.lang.Object
  |
  +--SSF.OS.ProtocolSession
        |
        +--SSF.OS.UDP.udpSessionMaster
All Implemented Interfaces:
com.renesys.raceway.DML.Configurable

public class udpSessionMaster
extends ProtocolSession

Main UDP ProtocolSession in the ProtocolGraph. Opens a UDP session when an application opens a UDP socket, and manages a list of open UDP sessions. Demultiplexes incoming UDP messages to appropriate sessions.


Field Summary
 int max_datagram_size
          default maximum datagram size in virtual bytes
 
Fields inherited from class SSF.OS.ProtocolSession
name, use
 
Constructor Summary
udpSessionMaster()
          Constructors
 
Method Summary
 void closeSession(udpSession udpsess)
          close a UDP session - called by a socket
 void config(com.renesys.raceway.DML.Configuration cfg)
          Supported DML attributes:
 udpSession FindSession(int locPort, int destIpAdr, int destPort)
          Look for a session in the UDP session list by its identification of local port number, and remote IP address and port number.
 void init()
          initialize the udpSessionMaster, get the instance of Socket session and IP session.
 udpSession openSession(udpSocket sock)
          open a UDP session - called by a socket
 void printMsg(UDP_Header hdr)
          print out the content of a UDP message
 boolean push(ProtocolMessage message, ProtocolSession fromSession)
          demux a UDP message from IP to proper UDP session
 
Methods inherited from class SSF.OS.ProtocolSession
close, closed, debugIdentifier, inGraph, open, opened, pushAfterDelay, pushAfterDelayFailed, setGraph, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

max_datagram_size

public int max_datagram_size
default maximum datagram size in virtual bytes

Constructor Detail

udpSessionMaster

public udpSessionMaster()
Constructors

Method Detail

init

public void init()
          throws ProtocolException
initialize the udpSessionMaster, get the instance of Socket session and IP session.

Overrides:
init in class ProtocolSession
ProtocolException

config

public void config(com.renesys.raceway.DML.Configuration cfg)
            throws com.renesys.raceway.DML.configException
Supported DML attributes:
   ProtocolSession [name udp use SSF.OS.UDP.udpSessionMaster
     udpinit [
       max_datagram_size %I   # max UDP datagram size (payload bytes, int)
       debug %S               # print verbose UDP diagnostics, true/false
     ]
   ]
 

Specified by:
config in interface com.renesys.raceway.DML.Configurable
Overrides:
config in class ProtocolSession
com.renesys.raceway.DML.configException

openSession

public udpSession openSession(udpSocket sock)
open a UDP session - called by a socket


closeSession

public void closeSession(udpSession udpsess)
close a UDP session - called by a socket


FindSession

public udpSession FindSession(int locPort,
                              int destIpAdr,
                              int destPort)
Look for a session in the UDP session list by its identification of local port number, and remote IP address and port number. A "listening" server UDP session will have remote (dest) IP address and port number both equal to -1. First search for a UDP session that matches all 3 identifiers; if not found, search for a server session that matches local Port; if not found return null.


push

public boolean push(ProtocolMessage message,
                    ProtocolSession fromSession)
             throws ProtocolException
demux a UDP message from IP to proper UDP session

Specified by:
push in class ProtocolSession
ProtocolException

printMsg

public void printMsg(UDP_Header hdr)
print out the content of a UDP message