|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpamvotis.core.SourceManager
public class SourceManager
Manages the sources of a node. Polls packets from every source and returns them in a vector of packets through the pollPacketsFromSources function.
Constructor Summary | |
---|---|
SourceManager(MobileNode node)
|
Method Summary | |
---|---|
void |
addSource(Source s)
Add a source to the node's source manager. |
void |
clear()
Removes all active sources. |
Source |
getSource(int id)
Finds a node's active source whose ID is 'id'. |
java.util.Vector<Packet> |
pollPacketsFromSources()
Polls packets from all sources. |
boolean |
removeSource(int sourceId)
Removes a source with the given session id. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SourceManager(MobileNode node)
Method Detail |
---|
public java.util.Vector<Packet> pollPacketsFromSources()
public void addSource(Source s) throws ElementExistsException
s
- The source instance.
ElementExistsException
public boolean removeSource(int sourceId) throws ElementDoesNotExistException
sourceId
-
ElementDoesNotExistException
public Source getSource(int id) throws ElementDoesNotExistException
id
- The ID of the source.
ElementDoesNotExistException
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |