com.caucho.cloud.topology
Class CloudSystem

java.lang.Object
  extended by com.caucho.cloud.topology.CloudSystem

public class CloudSystem
extends java.lang.Object

CloudDomain represents all the clusters in a Resin configuration.


Constructor Summary
CloudSystem(java.lang.String id)
          Creates a CloudDomain with an identifying id.
 
Method Summary
 void addClusterListener(CloudClusterListener listener)
          Adds a listener to detect server add and removed.
 CloudCluster createCluster(java.lang.String id)
          Creates a new cluster.
 CloudCluster findCluster(java.lang.String id)
          Finds the server with the unique id.
 CloudServer findServer(java.lang.String id)
          Finds the server with the unique id.
 CloudServer findServer(java.lang.String address, int port)
          Finds the first server with the given address and port
 CloudServer findServer(java.lang.String clusterId, int podIndex, int serverIndex)
          Finds the server with the unique id.
 CloudCluster[] getClusterList()
          Return the clusters in the cloud.
 java.lang.String getId()
          Returns the server id.
 boolean removeCluster(java.lang.String id)
          Creates a new cluster.
 void removeClusterListener(CloudClusterListener listener)
          Removes a listener to detect server add and removed.
 void start()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CloudSystem

public CloudSystem(java.lang.String id)
Creates a CloudDomain with an identifying id.

Method Detail

getId

public java.lang.String getId()
Returns the server id.


getClusterList

public CloudCluster[] getClusterList()
Return the clusters in the cloud.


findCluster

public CloudCluster findCluster(java.lang.String id)
Finds the server with the unique id.


findServer

public CloudServer findServer(java.lang.String id)
Finds the server with the unique id.


findServer

public CloudServer findServer(java.lang.String clusterId,
                              int podIndex,
                              int serverIndex)
Finds the server with the unique id.


findServer

public CloudServer findServer(java.lang.String address,
                              int port)
Finds the first server with the given address and port


createCluster

public CloudCluster createCluster(java.lang.String id)
Creates a new cluster.


removeCluster

public boolean removeCluster(java.lang.String id)
Creates a new cluster.


addClusterListener

public void addClusterListener(CloudClusterListener listener)
Adds a listener to detect server add and removed.


removeClusterListener

public void removeClusterListener(CloudClusterListener listener)
Removes a listener to detect server add and removed.


start

public void start()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object