drcl.inet.contract
Class IFQuery
java.lang.Object
drcl.comp.Contract
drcl.inet.contract.IFQuery
- public class IFQuery
- extends Contract
The InterfaceInfoQuery contract.
It also provides a set of static methods to conduct the contract at
a specified port. These methods are particularly useful in implementing
a protocol that makes use of the interface/neighbor information.
This contract defines three services at the reactor:
-
GetAllInterfacesInfo
- The initiator sends a
null
and the reactor returns an array of interface info
(InterfaceInfo[]) stored at the reactor.
-
GetOneInterfaceInfo
- The initiator sends the interface index (
IntObj).
and the reactor returns the interface info requested, null if
the interface does not exist.
-
SetAllInterfacesInfo
- The initiator sends an array of interface info
(
InterfaceInfo[])
and the reactor replaces what it has with the new set of information.
-
SetOneInterfaceInfo
- The initiator sends an array of two objects; the first of which is
a
IntObj indicating which interface to set;
the second of which is the interface information
(InterfaceInfo) to replace with.
In response, the reactor replaces the interface info at the specified
interface.
This class also provides a set of static methods to conduct the above services
from the specified port in various ways. These methods are particularly useful in implementing
a protocol that maintains, or needs to be aware of, the interface info of the node.
- Version:
- 1.0, 10/17/2000
- Author:
- Hung-ying Tyan
- See Also:
InterfaceInfo
|
Method Summary |
static double |
getBandwidth(int index_,
Port out_)
|
static int |
getBufferSize(int index_,
Port out_)
|
java.lang.Object |
getContractContent()
Returns the content of this contract (format?). |
static int |
getIndexByLocalAddr(long localAddr_,
Port out_)
|
static int |
getIndexByPeerAddr(long peerAddr_,
Port out_)
|
static InterfaceInfo |
getInterfaceInfo(int index_,
Port out_)
|
static InterfaceInfo[] |
getInterfaceInfos(BitSet ifset_,
Port out_)
|
static InterfaceInfo[] |
getInterfaceInfos(Port out_)
|
static NetAddress |
getLocalNetAddress(int index_,
Port out_)
|
static NetAddress |
getLocalNetAddress(long peerAddr_,
Port out_)
|
static int |
getMTU(int index_,
Port out_)
|
java.lang.String |
getName()
|
static int |
getNumOfInterfaces(Port out_)
|
static NetAddress[] |
getPeerNetAddresses(int index_,
Port out_)
|
static void |
setInterfaceInfo(int index_,
InterfaceInfo if_,
Port out_)
|
static void |
setInterfaceInfos(InterfaceInfo[] aa_,
Port out_)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IFQuery
public IFQuery()
IFQuery
public IFQuery(int role_)
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
getInterfaceInfos
public static InterfaceInfo[] getInterfaceInfos(Port out_)
getInterfaceInfos
public static InterfaceInfo[] getInterfaceInfos(BitSet ifset_,
Port out_)
getInterfaceInfo
public static InterfaceInfo getInterfaceInfo(int index_,
Port out_)
setInterfaceInfos
public static void setInterfaceInfos(InterfaceInfo[] aa_,
Port out_)
setInterfaceInfo
public static void setInterfaceInfo(int index_,
InterfaceInfo if_,
Port out_)
getPeerNetAddresses
public static NetAddress[] getPeerNetAddresses(int index_,
Port out_)
getLocalNetAddress
public static NetAddress getLocalNetAddress(int index_,
Port out_)
getLocalNetAddress
public static NetAddress getLocalNetAddress(long peerAddr_,
Port out_)
getIndexByLocalAddr
public static int getIndexByLocalAddr(long localAddr_,
Port out_)
getIndexByPeerAddr
public static int getIndexByPeerAddr(long peerAddr_,
Port out_)
getNumOfInterfaces
public static int getNumOfInterfaces(Port out_)
getMTU
public static int getMTU(int index_,
Port out_)
getBandwidth
public static double getBandwidth(int index_,
Port out_)
getBufferSize
public static int getBufferSize(int index_,
Port out_)
Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved. ~ To J-Sim Home ~