|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.bridge.util.AbstractCloud
org.mmbase.bridge.mock.MockCloud
public class MockCloud
Straight forward (partial) implementation of Cloud, which maintains everything in memory.
| Field Summary | |
|---|---|
(package private) MockCloudContext |
cloudContext
|
| Fields inherited from class org.mmbase.bridge.util.AbstractCloud |
|---|
transactions |
| Fields inherited from interface org.mmbase.bridge.Cloud |
|---|
PROP_IGNOREVALIDATION, PROP_REQUEST, PROP_RESPONSE, PROP_SESSIONNAME, PROP_XMLMODE |
| Constructor Summary | |
|---|---|
MockCloud(String n,
MockCloudContext cc,
UserContext uc)
|
|
| Method Summary | |
|---|---|
MockCloudContext |
getCloudContext()
Returns the context to which this cloud belongs. |
NodeList |
getList(Query query)
Executes a query and returns the result as a Cluster Node List (also if the query is a NodeQuery). |
Node |
getNode(int number)
Returns the node with the specified number from this cloud. |
(package private) Node |
getNode(MockCloudContext.NodeDescription nd,
boolean n)
|
Node |
getNodeByAlias(String alias)
Returns the node with the specified alias from this cloud. |
NodeManager |
getNodeManager(String name)
Returns the specified node manager. |
NodeManagerList |
getNodeManagers()
Returns all node managers available in this cloud. |
RelationManager |
getRelationManager(NodeManager sourceManager,
NodeManager destinationManager,
String roleName)
Returns the specified relation manager. |
RelationManager |
getRelationManager(String roleName)
Returns the specified relation manager. |
boolean |
hasNode(int number)
Determines whether a node with the specified number exists in this cloud. |
protected Transaction |
newTransaction(String name)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
final MockCloudContext cloudContext
| Constructor Detail |
|---|
MockCloud(String n,
MockCloudContext cc,
UserContext uc)
| Method Detail |
|---|
Node getNode(MockCloudContext.NodeDescription nd,
boolean n)
public Node getNode(int number)
throws NotFoundException
CloudNode with a reference to this
instance of Cloud.
getNode in interface CloudgetNode in class AbstractCloudnumber - the number of the requested node
NotFoundException - if the specified node could not be found
public Node getNodeByAlias(String alias)
throws NotFoundException
CloudNode with a reference to this
instance of Cloud.
getNodeByAlias in interface CloudgetNodeByAlias in class AbstractCloudalias - the alias of the requested node
NotFoundException - if the specified node could not be foundpublic boolean hasNode(int number)
CloudCloud.mayRead(int) to determine this.
hasNode in interface CloudhasNode in class AbstractCloudnumber - the number of the node
public NodeManagerList getNodeManagers()
Cloud
getNodeManagers in interface CloudgetNodeManagers in class AbstractCloudNodeManagerList containing all node managers
available in this cloud.
public NodeManager getNodeManager(String name)
throws NotFoundException
Cloud
getNodeManager in interface CloudgetNodeManager in class AbstractCloudname - the name of the requested node manager
NotFoundException - if the specified node manager could not be foundpublic MockCloudContext getCloudContext()
Cloud
getCloudContext in interface CloudgetCloudContext in class AbstractCloudCloudContext to which this cloud belongspublic NodeList getList(Query query)
CloudNodeQuery).
getList in interface CloudgetList in class AbstractCloudquery - Query to execute
SearchQueryprotected Transaction newTransaction(String name)
newTransaction in class AbstractCloudpublic String toString()
toString in class Object
public RelationManager getRelationManager(NodeManager sourceManager,
NodeManager destinationManager,
String roleName)
throws NotFoundException
Cloud
getRelationManager in interface CloudgetRelationManager in class AbstractCloudsourceManager - the node manager of the source nodedestinationManager - the node manager of the destination noderoleName - name of the role
NotFoundException - if the specified relation manager could not be found
public RelationManager getRelationManager(String roleName)
throws NotFoundException
Cloud
getRelationManager in interface CloudgetRelationManager in class AbstractCloudroleName - name of the role
NotFoundException - if the specified relation manager could not be found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||