|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--disciple.core.DataDistributor
The role of the DataDistributor is to replicate commands and forward them to the active connections. The DataDistributor holds a list of all connections and knows the status of the connections i.e. connected or disconnected. If a DataDistributionAgent is present, the DataDistributor will use it to preform a selection of connections to forward commands to, based on e.g. user context and preferences, and resource status. The DataDistributor also implements the ResourceConsumer interface, and is listening for changes to the resource parameters.
Copyright (c) 2002 Rutgers, The State University of New Jersey
| Field Summary | |
protected Connection[] |
connections_
The list of connections. |
protected Controller |
controller_
|
protected DataDistributionAgent |
distributionAgent_
|
protected ReplicationPolicy |
replicationPolicy_
|
| Constructor Summary | |
DataDistributor(Controller controller)
|
|
| Method Summary | |
void |
addConnection(Connection connection)
Adds a connection to the list of connections. |
Connection |
getConnection(java.lang.Object destination)
Returns a connection by destination id. |
Connection[] |
getConnections()
Returns all connections. |
Controller |
getController()
|
DataDistributionAgent |
getDataDistributionAgent()
|
ReplicationPolicy |
getReplicationPolicy()
|
void |
removeConnection(Connection connection)
Removes a connection from the list of connections. |
void |
resourceParametersChanged(org.w3c.dom.Node parameters)
|
void |
send(Command cmd)
Forwards a command to the active connections, using the DataDistributionAgent to select the connections. |
void |
send(Command cmd,
Connection connection,
int priority)
Forwards a command to an active connection. |
void |
setController(Controller controller)
|
void |
setDataDistributionAgent(DataDistributionAgent agent)
|
void |
setReplicationPolicy(ReplicationPolicy policy)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Controller controller_
protected DataDistributionAgent distributionAgent_
protected ReplicationPolicy replicationPolicy_
protected Connection[] connections_
| Constructor Detail |
public DataDistributor(Controller controller)
| Method Detail |
public void send(Command cmd)
cmd -
public void send(Command cmd,
Connection connection,
int priority)
cmd - Command to send.connection - Connection to send to.priority - Priority of command.public void setDataDistributionAgent(DataDistributionAgent agent)
agent - public DataDistributionAgent getDataDistributionAgent()
public void setReplicationPolicy(ReplicationPolicy policy)
public ReplicationPolicy getReplicationPolicy()
public void addConnection(Connection connection)
connection - public void removeConnection(Connection connection)
connection - public Connection getConnection(java.lang.Object destination)
public Connection[] getConnections()
public Controller getController()
getController in interface Servicepublic void setController(Controller controller)
setController in interface Servicecontroller - public void resourceParametersChanged(org.w3c.dom.Node parameters)
resourceParametersChanged in interface ResourceConsumerparameters -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||