|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jolsrv2.Interface
public class Interface
The class is responsible for dealing with all things related to the interfaces
Constructor Summary | |
---|---|
Interface(boolean multiple,
CidrAddress localCAddress,
java.net.InetAddress broadcastAddress,
int port)
|
Method Summary | |
---|---|
void |
generateHello()
Creates a new HELLO message and adds it to the queue of outgoing messages |
void |
generateTc()
Creates a new TC message and adds it to the queue of outgoing messages |
int |
getAPacketSequenceNumber()
Returns the next packet sequence number. |
java.net.InetAddress |
getBroadcastAddress()
|
CidrAddress |
getLocalCAddress()
Returns the local CIDR address |
java.util.ArrayList<java.net.InetAddress> |
getMprs()
Return the MPRs on the Interface |
java.net.DatagramSocket |
getSocket()
Returns the datagram socket |
void |
offerToOutgoingMessages(Message message)
Puts a new message in the outgoing messages queue. |
void |
offerToParsedPackets(ParsedPacket parsedPacket)
Puts a new parsed packet in the parsed packets queue |
void |
populateMprSet()
Populates the MPR set on the Interface |
void |
processParsedPackets()
The methods takes an incoming message, populates the repositories with it and checks if it is to be forwarded |
void |
purgeReceivedSet()
Purges the received set |
java.util.ArrayList<Message> |
takeFromOutgoingMessages()
Takes one or more messages from the outgoing queue in a FIFO manner |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Interface(boolean multiple, CidrAddress localCAddress, java.net.InetAddress broadcastAddress, int port)
multiple
- whether or not multiple interfaces are usedlocalCAddress
- the local CIDR address the local CIDR addressbroadcastAddress
- the broadcast Address the broadcast addressport
- the port to be used for broadcastsMethod Detail |
---|
public void generateHello()
public void generateTc()
public CidrAddress getLocalCAddress()
public java.util.ArrayList<Message> takeFromOutgoingMessages()
public void populateMprSet()
public java.util.ArrayList<java.net.InetAddress> getMprs()
public void offerToOutgoingMessages(Message message)
message
- to be put in the queuepublic void offerToParsedPackets(ParsedPacket parsedPacket)
parsedPacket
- to be put in the queuepublic int getAPacketSequenceNumber()
public void purgeReceivedSet()
public java.net.DatagramSocket getSocket()
public java.net.InetAddress getBroadcastAddress()
public void processParsedPackets()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |