kaos.aci
Class ACIAdminClient

java.lang.Object
  extended by kaos.aci.ACIClient
      extended by kaos.aci.mockets.MocketClient
          extended by kaos.aci.ACIAdminClient

public class ACIAdminClient
extends MocketClient

Author:
Administrator

Nested Class Summary
 
Nested classes/interfaces inherited from class kaos.aci.ACIClient
ACIClient.MocketConnectThread, ACIClient.ReceiverThread
 
Field Summary
 
Fields inherited from class kaos.aci.ACIClient
_host, _listeners, _mocket, _port, _reader, _resultTable, _serverIsLocal, _writer, DEFAULT_PORT, OK_MESSAGE, RECONNECT_DELAY, WARNING_MESSAGE
 
Constructor Summary
ACIAdminClient()
           
ACIAdminClient(java.lang.String host, int port)
           
 
Method Summary
protected  void addConnectionConstraint(java.lang.String srcHost, java.lang.Integer srcPort, java.lang.String dstHost, java.lang.Integer dstPort, java.lang.Integer maxBytesPerSecond)
          Use setConnectionConstraint instead because there can be only 0 or 1 maxBandwidth constraints per connection.
 void removeConnectionConstraint(java.lang.String srcHost, java.lang.Integer srcPort, java.lang.String dstHost, java.lang.Integer dstPort)
          Remove the KAoS policy constraining max bytes per second for the give connection if one exists.
 void setConnectionConstraint(java.lang.String srcHost, java.lang.Integer srcPort, java.lang.String dstHost, java.lang.Integer dstPort, java.lang.Integer maxBytesPerSecond)
          Create a KAoS Policy to constrain the bandwidth permitted between two nodes.
 
Methods inherited from class kaos.aci.mockets.MocketClient
getConnectionConstraints, getInstance, main
 
Methods inherited from class kaos.aci.ACIClient
addPolicyUpdateListener, connectViaMocket, connectViaSocket, peerReachable, peerUnreachableWarning, removePolicyUpdateListener, satisfyRequest, sendMessageToKPAT
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACIAdminClient

public ACIAdminClient(java.lang.String host,
                      int port)

ACIAdminClient

public ACIAdminClient()
Method Detail

setConnectionConstraint

public void setConnectionConstraint(java.lang.String srcHost,
                                    java.lang.Integer srcPort,
                                    java.lang.String dstHost,
                                    java.lang.Integer dstPort,
                                    java.lang.Integer maxBytesPerSecond)
                             throws java.io.IOException
Create a KAoS Policy to constrain the bandwidth permitted between two nodes. There can be only one ConnectionConstraint per pair of source-destination connections. This method will either add a constraint if none exists or modify the existing maxBytesPerSecond of an existing constraint.

Parameters:
srcHost - - IP of the source node
srcPort - - port of the source node
dstHost - - IP of the destination node
dstPort - - port of the destination node
maxBytesPerSecond - - maximum permitted bytes per socond for this source-destination connection
Throws:
java.io.IOException

removeConnectionConstraint

public void removeConnectionConstraint(java.lang.String srcHost,
                                       java.lang.Integer srcPort,
                                       java.lang.String dstHost,
                                       java.lang.Integer dstPort)
                                throws java.io.IOException
Remove the KAoS policy constraining max bytes per second for the give connection if one exists.

Parameters:
srcHost - - IP of the source node
srcPort - - port of the source node
dstHost - - IP of the destination node
dstPort - - port of the destination node
Throws:
java.io.IOException

addConnectionConstraint

protected void addConnectionConstraint(java.lang.String srcHost,
                                       java.lang.Integer srcPort,
                                       java.lang.String dstHost,
                                       java.lang.Integer dstPort,
                                       java.lang.Integer maxBytesPerSecond)
                                throws java.io.IOException
Use setConnectionConstraint instead because there can be only 0 or 1 maxBandwidth constraints per connection.

Parameters:
srcHost - - IP of the source node
srcPort - - port of the source node
dstHost - - IP of the destination node
dstPort - - port of the destination node
maxBytesPerSecond - - maximum permitted bytes per socond for this source-destination connection
Throws:
java.io.IOException