|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgps.protocol.Protocol
public class Protocol
Protocol base class, all specific protocols inherit from it.
| Constructor Summary | |
|---|---|
Protocol()
dummy constructor |
|
| Method Summary | |
|---|---|
void |
confAgents()
configure agents for this protocol, to be overriden |
void |
confDocuments()
configure documents for this protocol, to be overriden |
void |
confEvents()
configure events for this protocol, to be overriden |
Agent |
getAgent(int id)
gets the agent instance from it's id |
Agent[] |
getAgentList()
gets agent object list |
double |
getDelayAgent(Agent agent1,
Agent agent2)
gets delay between two agents |
double |
getDelayAgent(int agent1,
int agent2)
gets delay between two agents |
java.util.Properties |
getProtocolProperties()
gets protocol properties |
java.util.Properties |
getSimulatorProperties()
gets simulator properties |
void |
loadProtocolProperties(java.lang.String path)
loads protocol properties, to be overriden |
void |
reset()
resets status |
void |
setAgent(int index,
Agent a)
sets an agent object at the specified locaiton |
void |
setAgentNum(int num)
sets agent number |
void |
setAgentNum(int snum,
int pnum)
sets the agent number in this topology, this method is used for p2p networks with servers and peers |
void |
setPAgent(int index,
Peer p)
sets an pagent object at the specified locaiton |
java.util.Properties |
setProtocolProperties(java.util.Properties p)
sets protocol properties |
void |
setSAgent(int index,
Server s)
sets an sagent object at the specified locaiton |
void |
setSimulatorProperties(java.util.Properties p)
sets simulator properties |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Protocol()
| Method Detail |
|---|
public void reset()
public void loadProtocolProperties(java.lang.String path)
path - path to the configuration filepublic java.util.Properties getSimulatorProperties()
public void setSimulatorProperties(java.util.Properties p)
p - simulator propertiespublic java.util.Properties getProtocolProperties()
public java.util.Properties setProtocolProperties(java.util.Properties p)
p - protocol properties
public double getDelayAgent(int agent1,
int agent2)
agent1 - source agent idagent2 - destination agent id
public double getDelayAgent(Agent agent1,
Agent agent2)
agent1 - source agentagent2 - destination agentpublic Agent getAgent(int id)
id - agent idpublic Agent[] getAgentList()
public void setAgentNum(int num)
num - new agent number
public void setAgent(int index,
Agent a)
index - the index of the agenta - agent object
public void setAgentNum(int snum,
int pnum)
snum - is number of peer agentspnum - is number of server agents
public void setSAgent(int index,
Server s)
index - the index of the sagents - sagent object
public void setPAgent(int index,
Peer p)
index - the index of the pagentp - pagent objectpublic void confDocuments()
public void confEvents()
public void confAgents()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||