public abstract class GCUBEScope extends Object
1) scopes are named, typed, and may be enclosed in another scopes. Three levels of nesting are possible:
the type of root scopes is INFRASTRUCTURE, the type of scopes below infrastructures is VO, and the type of scopes below that
is VRE.
2) scopes are generated from linear expressions of the form /[string]/[string]/[string], where each
separator introduces a level of scope and each string names the scope.
| Modifier and Type | Class and Description |
|---|---|
static class |
GCUBEScope.MalformedScopeExpressionException
Raised when parsing malformed scope expressions.
|
static class |
GCUBEScope.ScopeExpression
Helper class to parse scope expressions.
|
static class |
GCUBEScope.Type
Scope types *
|
| Modifier and Type | Field and Description |
|---|---|
protected static char |
pathSeparator
Scope separators used in linear syntax.
|
protected ServiceMap |
serviceMap
The map of service endpoints associated with the scope.
|
| Modifier | Constructor and Description |
|---|---|
protected |
GCUBEScope(String name)
Used internally to creates a new scope with a given name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
GCUBEScope |
getEnclosingScope()
Returns the enclosing scope, if any.
|
GCUBEScope |
getInfrastructure()
Returns the infrastructure of this scope.
|
String |
getName()
Returns the name of the scope.
|
static GCUBEScope |
getScope(String exp)
Returns a scope from its linear expression.
|
abstract ServiceMap |
getServiceMap()
Returns the map of service endpoints associated with the scope.
|
GCUBEScope.Type |
getType()
Returns the type of the scope.
|
int |
hashCode() |
boolean |
isEnclosedIn(GCUBEScope scope) |
boolean |
isInfrastructure()
Indicates whether the scope is the whole infrastructure.
|
void |
makeCurrent()
Used internally to creates a new scope with a given name.
|
protected void |
setEnclosingScope(GCUBEScope enclosingScope)
Used internally to set the enclosing scope of the scope.
|
void |
setServiceMap(ServiceMap map)
Sets the map of service endpoint associated with the scope.
|
String |
toString()
Returns the linear expression of the scope.
|
protected static char pathSeparator
protected ServiceMap serviceMap
protected GCUBEScope(String name)
name - the name.public static GCUBEScope getScope(String exp) throws GCUBEScope.MalformedScopeExpressionException
exp - the expressions.GCUBEScope.MalformedScopeExpressionException - if the expression is malformed.public void makeCurrent()
name - the name.public GCUBEScope getInfrastructure()
public String getName()
public GCUBEScope getEnclosingScope()
null if the scope is the whole infrastructure.public boolean isInfrastructure()
true if it is, false otherwise.protected void setEnclosingScope(GCUBEScope enclosingScope)
enclosingScope - the enclosing scope.public GCUBEScope.Type getType()
public String toString()
public boolean isEnclosedIn(GCUBEScope scope)
public abstract ServiceMap getServiceMap() throws GCUBEScopeNotSupportedException
GCUBEScopeNotSupportedException - if no service map is associated with the scope.public void setServiceMap(ServiceMap map)
map - the service map.Copyright © 2015. All Rights Reserved.