public class Processor extends NetworkObject
Modifier and Type | Field and Description |
---|---|
static int |
EVENT_ALGORITHM_ADDED |
static int |
EVENT_ALGORITHM_REMOVED |
static int |
EVENT_ALGORITHM_UPDATED |
static int |
EVENT_DISPLAY |
static int |
EVENT_MESSAGE_RECEIVED |
static int |
EVENT_MESSAGE_SENT |
static int |
EVENT_NEIGHBOUR_ADDED |
static int |
EVENT_NEIGHBOUR_REMOVE |
static int |
EVENT_PART_FAIL |
static int |
EVENT_SOURCE_ADDED |
static int |
EVENT_SOURCE_REMOVE |
EVENT_ID_UPDATE, EVENT_SETTINGS_UPDATE, EVENT_STATS_UPDATE, EVENT_STATUS_UPDATE, settings, settingsLock, stats, statsLock, status, STATUS_ERROR, STATUS_FAILED, STATUS_NOTSTARTED, STATUS_PAUSED, STATUS_RUNNING, STATUS_TERMINATED, STATUS_WAITING, statusLock
Constructor and Description |
---|
Processor(java.lang.String id) |
Processor(java.lang.String id,
Processor p) |
Modifier and Type | Method and Description |
---|---|
void |
addAlgorithm(int port,
java.lang.String algorithm) |
void |
addAlgorithm(int port,
java.lang.String algorithm,
java.lang.Object caller) |
void |
addNeighbour(Link l,
Processor p) |
void |
addNeighbour(Link l,
Processor p,
java.lang.Object caller) |
void |
addSource(Link l,
Processor p) |
void |
addSource(Link l,
Processor p,
java.lang.Object caller) |
void |
algorithmTerminated(Algorithm a) |
void |
algorithmUpdateStatus(Algorithm a,
java.lang.String status) |
java.lang.String |
checkTermStatus() |
protected void |
copyFrom(NetworkObject o) |
void |
destory() |
void |
displayEvent(java.lang.String text,
int pos,
java.lang.Object caller) |
java.lang.Object[][] |
dumpAlgorithms() |
java.util.Collection<Algorithm> |
getAlgorithmInstance() |
double |
getLinkBandwidth(NetworkState ns,
java.lang.String linkID) |
int |
getLinkDelay(NetworkState ns,
java.lang.String linkID) |
java.lang.String |
getLinkID(java.lang.String procID) |
java.lang.String[] |
getLinkIDs() |
Link[] |
getLinks(NetworkState ns) |
java.awt.Point |
getLocation() |
java.lang.String |
getNeighbourID(java.lang.String linkID) |
java.lang.String[] |
getNeighbourIDs() |
Processor[] |
getNeighbours() |
MessageInQueue |
getQueue(int port) |
char |
getShortType() |
java.lang.String[] |
getSourceIDs() |
java.lang.String[] |
getSourceLinkIDs() |
Processor[] |
getSources() |
java.lang.String |
getType() |
boolean |
hasAlgorithmSet() |
boolean |
hasLink(java.lang.String linkID) |
boolean |
hasNeighbour(java.lang.String procID) |
boolean |
initializeAlgorithms(NetworkState ns) |
boolean |
isRoot() |
boolean |
portInUse(int port) |
void |
receive(Link l,
BackEndMessage bm) |
void |
removeAlgorithm(int port) |
void |
removeAlgorithm(int port,
java.lang.Object caller) |
void |
removeNeighbour(Link l) |
void |
removeNeighbour(Link l,
java.lang.Object caller) |
void |
removeSource(Link l) |
void |
removeSource(Link l,
java.lang.Object caller) |
boolean |
send(NetworkState ns,
BackEndMessage bm,
java.lang.Object caller) |
void |
setDefaultSettings(NetworkState ns) |
void |
setDefaultStats(NetworkState ns) |
void |
setLocation(java.awt.Point p) |
void |
startAlgorithms() |
void |
updateAlgorithm(int port,
java.lang.String algorithm) |
void |
updateAlgorithm(int port,
java.lang.String algorithm,
java.lang.Object caller) |
void |
updatePort(int oldPort,
int newPort) |
void |
updatePort(int oldPort,
int newPort,
java.lang.Object caller) |
addListener, addListener, doSpeedChange, dumpSettings, dumpStats, getID, getSetting, getStat, getStatus, incrementSetting, incrementSetting, incrementSetting, incrementSetting, incrementStat, incrementStat, incrementStat, incrementStat, notifyListeners, removeListener, resetForLoad, setID, setID, setSetting, setSetting, setStat, setStat, setStatus, setStatus, toLogID, toString
public static final int EVENT_NEIGHBOUR_ADDED
public static final int EVENT_NEIGHBOUR_REMOVE
public static final int EVENT_ALGORITHM_ADDED
public static final int EVENT_ALGORITHM_REMOVED
public static final int EVENT_ALGORITHM_UPDATED
public static final int EVENT_SOURCE_REMOVE
public static final int EVENT_SOURCE_ADDED
public static final int EVENT_MESSAGE_SENT
public static final int EVENT_MESSAGE_RECEIVED
public static final int EVENT_DISPLAY
public static final int EVENT_PART_FAIL
public Processor(java.lang.String id, Processor p)
public Processor(java.lang.String id)
protected void copyFrom(NetworkObject o)
copyFrom
in class NetworkObject
public void setDefaultSettings(NetworkState ns)
setDefaultSettings
in class NetworkObject
public java.lang.String[] getSourceLinkIDs()
public Processor[] getSources()
public java.lang.String[] getSourceIDs()
public java.lang.String[] getLinkIDs()
public Link[] getLinks(NetworkState ns)
public Processor[] getNeighbours()
public java.lang.String[] getNeighbourIDs()
public boolean hasNeighbour(java.lang.String procID)
public int getLinkDelay(NetworkState ns, java.lang.String linkID)
public double getLinkBandwidth(NetworkState ns, java.lang.String linkID)
public boolean hasLink(java.lang.String linkID)
public java.lang.String getNeighbourID(java.lang.String linkID)
public java.lang.String getLinkID(java.lang.String procID)
public void removeNeighbour(Link l)
public void removeNeighbour(Link l, java.lang.Object caller)
public void removeSource(Link l)
public void removeSource(Link l, java.lang.Object caller)
public void setDefaultStats(NetworkState ns)
setDefaultStats
in class NetworkObject
public java.lang.String getType()
getType
in class NetworkObject
public boolean hasAlgorithmSet()
public void addAlgorithm(int port, java.lang.String algorithm)
public void addAlgorithm(int port, java.lang.String algorithm, java.lang.Object caller)
public void updateAlgorithm(int port, java.lang.String algorithm)
public void updateAlgorithm(int port, java.lang.String algorithm, java.lang.Object caller)
public void removeAlgorithm(int port)
public void removeAlgorithm(int port, java.lang.Object caller)
public boolean portInUse(int port)
public java.lang.Object[][] dumpAlgorithms()
public void updatePort(int oldPort, int newPort)
public void updatePort(int oldPort, int newPort, java.lang.Object caller)
public void receive(Link l, BackEndMessage bm)
public MessageInQueue getQueue(int port)
public boolean initializeAlgorithms(NetworkState ns)
public boolean isRoot()
public void startAlgorithms()
public java.util.Collection<Algorithm> getAlgorithmInstance()
public boolean send(NetworkState ns, BackEndMessage bm, java.lang.Object caller)
public void algorithmUpdateStatus(Algorithm a, java.lang.String status)
public void algorithmTerminated(Algorithm a)
public void displayEvent(java.lang.String text, int pos, java.lang.Object caller)
public char getShortType()
getShortType
in class NetworkObject
public java.lang.String checkTermStatus()
public void destory()
destory
in class NetworkObject
public void setLocation(java.awt.Point p)
public java.awt.Point getLocation()