|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface provides the key abstraction for Context Services.
A Context describes a service interface that
can be accessed in a distributed environment. Contexts are used to
set system boundaries, system properties, system policies, and
manage essential system services.
Note that this interface contains a removeContext, but no
addContext. Adding a context is actually achieved by
starting a new context service process.
| Method Summary | |
boolean |
addPlatform(UniqueID platform,
java.lang.String name,
boolean clusterHint)
This method is used to add a platform to the context. |
void |
addPlatformListener(PlatformListener platformListener)
This method is used to add a listener that is notified when platforms are added to the context or deleted from the Context. |
void |
addPolicyListener(PolicyListener policyListener)
This method is used to add a listener that is notified when policies are added, changed, or deleted in a context. |
void |
addPropertyListener(PropertyListener propertyListener)
This method is used to add a listener that is notified when properties are added, changed, or deleted in a Context. |
void |
addRelationship(UniqueID context,
java.lang.String name)
This method is used to add relationships between this context and another. |
void |
addRelationshipListener(RelationshipListener relationshipListener)
This method is used to add a listener that is notified when context relationships are added or removed. |
net.openwings.cluster.ClusterDescriptor |
getCluster()
This method returns the cluster descriptor of the context cluster. |
UniqueID |
getID()
This method is returns the unique identifier for the context. |
java.lang.String |
getName()
This method is returns the name of the context. |
PlatformDescriptor[] |
getPlatforms()
This method is used to get all of the platforms for the context. |
Policy[] |
getPolicies()
This method is used to get all of the policies for the context |
Policy |
getPolicy(java.lang.String key)
This method is used to get a policy from the context. |
java.lang.String[] |
getPolicyKeys()
This method is used to get all of the policy keys for the context. |
java.util.Properties |
getProperties()
This method is used to get all of the properties for this context. |
java.lang.String |
getProperty(java.lang.String key)
This method is used to get a property from the context. |
ContextDescriptor[] |
getRelationships()
This method returns the relationships this context currently has. |
void |
removeContext()
This method is used to remove / destroy this context. |
void |
removePlatform(UniqueID platform,
java.lang.String name)
This method is used to remove a platform from a context. |
void |
removePlatformListener(PlatformListener platformListener)
This method is used to remove a listener that is notified when platforms are added to the context or deleted from the Context. |
Policy |
removePolicy(java.lang.String key)
This method is used to remove a policy from the context. |
void |
removePolicyListener(PolicyListener policyListener)
This method is used to remove a listener that is notified when policies are added, changed, or deleted in a context. |
java.lang.String |
removeProperty(java.lang.String key)
This method is used to remove a property from the context. |
void |
removePropertyListener(PropertyListener propertyListener)
This method is used to remove a listener that is notified when properties are added, changed, or deleted in a Context. |
void |
removeRelationship(UniqueID context,
java.lang.String name)
This method is used to remove a relationship between this context and another. |
void |
removeRelationshipListener(RelationshipListener relationshipListener)
This method is used to remove a listener that is notified when context relationships are added or removed. |
Policy |
setPolicy(java.lang.String key,
Policy policy)
This method is used to set a policy for the context. |
java.lang.String |
setProperty(java.lang.String key,
java.lang.String value)
This method is used to set a property for the context. |
| Method Detail |
public UniqueID getID()
throws java.rmi.RemoteException
java.rmi.RemoteException - if there is an error communicating with
the context.
public java.lang.String getName()
throws java.rmi.RemoteException
UniqueID is really the
primary identifier of the context.
java.rmi.RemoteException - if there is an error communicating with
the context.
public net.openwings.cluster.ClusterDescriptor getCluster()
throws java.rmi.RemoteException
null if clustering
is not supported by this context.
java.rmi.RemoteException - if there is an error communicating with
the context.
public java.util.Properties getProperties()
throws java.rmi.RemoteException
java.rmi.RemoteException - if there is an error communicating with
the context.
public java.lang.String getProperty(java.lang.String key)
throws java.rmi.RemoteException
key - This is the key for this property.
java.rmi.RemoteException - if there is an error communicating with
the context.
public java.lang.String setProperty(java.lang.String key,
java.lang.String value)
throws java.rmi.RemoteException
key - The key of the property to set.value - The value of the property to set.
null if it did not exist.
java.rmi.RemoteException - if there is an error communicating with
the context.
public java.lang.String removeProperty(java.lang.String key)
throws java.rmi.RemoteException
key - This is the key for the property to remove.
null if it did not exist.
java.rmi.RemoteException - if there is an error communicating with
the context.
public Policy[] getPolicies()
throws java.rmi.RemoteException
java.rmi.RemoteException - if there is an error communicating with
the context.
public Policy getPolicy(java.lang.String key)
throws java.rmi.RemoteException
key - The name of the policy.
java.rmi.RemoteException - if there is an error communicating with
the context.
public java.lang.String[] getPolicyKeys()
throws java.rmi.RemoteException
java.rmi.RemoteException - if there is an error communicating with
the context.
public Policy setPolicy(java.lang.String key,
Policy policy)
throws java.rmi.RemoteException
key - The name of the policy.policy - The policy object.
null if it did not exist.
java.rmi.RemoteException - if there is an error communicating with
the context.
public Policy removePolicy(java.lang.String key)
throws java.rmi.RemoteException
key - This is the name of the policy to remove.
null if it did not exist.
java.rmi.RemoteException - if there is an error communicating with
the context.
public PlatformDescriptor[] getPlatforms()
throws java.rmi.RemoteException
java.rmi.RemoteException - if there is an error communicating with
the context.
public boolean addPlatform(UniqueID platform,
java.lang.String name,
boolean clusterHint)
throws java.rmi.RemoteException
platform - unique identifier for the ContainerManager
representing the platform.name - Host name of the platform being added.clusterHint - If true it implies that this platform is a candidate
to be part of the context cluster. If the context implementation does
support clustering this hint is ignored.
java.rmi.RemoteException - if there is an error communicating with
the context.
public void removePlatform(UniqueID platform,
java.lang.String name)
throws java.rmi.RemoteException
platform - unique identifier for the ContainerManager
representing the platform.name - Host name of the platform being removed.
java.rmi.RemoteException - if there is an error communicating with
the context.
public ContextDescriptor[] getRelationships()
throws java.rmi.RemoteException
null if there are no
current relationships.
java.rmi.RemoteException - if there is an error communicating with
the context.
public void addRelationship(UniqueID context,
java.lang.String name)
throws java.rmi.RemoteException
context - The unique identifier for the context.name - Name of the context being added.
null if it did not exist.
java.rmi.RemoteException - if there is an error communicating with
the context.
public void removeRelationship(UniqueID context,
java.lang.String name)
throws java.rmi.RemoteException
context - The UniqueId of the context to remove the
relationship with.name - Name of the context being removed.
java.rmi.RemoteException - if there is an error communicating with
the context.
public void removeContext()
throws java.rmi.RemoteException
java.rmi.RemoteException - if there is an error communicating with
the context.
public void addPlatformListener(PlatformListener platformListener)
throws java.rmi.RemoteException
Context.
Object equality is used to keep track of listeners, hence multiple
registrations of the same listener will act as a single registration.
platformListener - Listener to add.
java.rmi.RemoteException - if there is an error communicating with
the context.
public void removePlatformListener(PlatformListener platformListener)
throws java.rmi.RemoteException
Context.
Object equality is used to keep track of listeners, hence multiple
removals will act as a single removal.
platformListener - Listener to remove
java.rmi.RemoteException - if there is an error communicating with
the context.
public void addRelationshipListener(RelationshipListener relationshipListener)
throws java.rmi.RemoteException
relationshipListener - Listener to add
java.rmi.RemoteException - if there is an error communicating with
the context.
public void removeRelationshipListener(RelationshipListener relationshipListener)
throws java.rmi.RemoteException
relationshipListener - Listener to remove
java.rmi.RemoteException - if there is an error communicating with
the context.
public void addPropertyListener(PropertyListener propertyListener)
throws java.rmi.RemoteException
Context.
Object equality is used to keep track of listeners, hence multiple
registrations of the same listener will act as a single registration.
propertyListener - Listener to add
java.rmi.RemoteException - if there is an error communicating with
the context.
public void removePropertyListener(PropertyListener propertyListener)
throws java.rmi.RemoteException
Context.
Object equality is used to keep track of listeners, hence multiple
removals will act as a single removal.
propertyListener - Listener to remove
java.rmi.RemoteException - if there is an error communicating with
the context.
public void addPolicyListener(PolicyListener policyListener)
throws java.rmi.RemoteException
policyListener - Listener to add
java.rmi.RemoteException - if there is an error communicating with
the context.
public void removePolicyListener(PolicyListener policyListener)
throws java.rmi.RemoteException
policyListener - Listener to remove
java.rmi.RemoteException - if there is an error communicating with
the context.
|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||