DRCL J-Sim API

drcl.inet.contract
Class DatagramContract

java.lang.Object
  extended bydrcl.comp.Contract
      extended bydrcl.inet.contract.DatagramContract

public class DatagramContract
extends Contract

The datagram sending/delivery contract. This contract defines the data exchange formats between two protocol layers that use datagrams. Specifically, the contract defines the following message format:

  1. the packet to be sent (Object),
  2. the source address (long),
  3. the destination address (long),
  4. the port (int), and
  5. the type of service (long).
When sending a datagram, one may specify the source address as Address.NULL_ADDR to have the lower layer to put in an appropriate address for the upper layer.

Version:
1.0, 10/17/2000
Author:
Hung-ying Tyan

Nested Class Summary
static class DatagramContract.Message
           
 
Field Summary
static DatagramContract INSTANCE
           
 
Fields inherited from class drcl.comp.Contract
Role_INITIATOR, Role_PEER, Role_REACTOR
 
Constructor Summary
DatagramContract()
           
DatagramContract(int role_)
           
 
Method Summary
 java.lang.Object getContractContent()
          Returns the content of this contract (format?).
 java.lang.String getName()
           
 
Methods inherited from class drcl.comp.Contract
getRole, match, setRole
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final DatagramContract INSTANCE
Constructor Detail

DatagramContract

public DatagramContract()

DatagramContract

public DatagramContract(int role_)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in class Contract

getContractContent

public java.lang.Object getContractContent()
Description copied from class: Contract
Returns the content of this contract (format?).

Specified by:
getContractContent in class Contract

DRCL J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~