|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.broker.config.proxy.AdministeredObject
com.ibm.broker.config.proxy.TopicProxy
public class TopicProxy
Represents a node in the topic hierarchy.
In order to use TopicProxy objects, applications must first obtain handles to them. Here is an example of how to do this:
ConfigManagerConnectionParameters cmcp = new MQConfigManagerConnectionParameters("localhost", 1414, "QMGR"); ConfigManagerProxy cmp = ConfigManagerProxy.getInstance(cmcp); TopicRootProxy t1 = cmp.getTopicRoot(); TopicProxy t2 = t1.getChildTopicByName("shares"); TopicProxy t3 = t2.getChildTopicByName("tech"); TopicProxy t4 = t3.getChildTopicByName("ibm");
com.ibm.broker.config.proxy.TopicProxy extends
com.ibm.broker.config.proxy.AdministeredObject
|
|
Responsibilities | Represents a node in the topic tree. Is also a container of sub-topics. Sub-topics are also represented as TopicProxy objects, and the result is a Topic hierarchy. |
Internal Collaborators | None |
Change Activity: -------- ----------- ------------- ------------------------------------ Reason: Date: Originator: Comments: -------- ----------- ------------- ------------------------------------ f25103.1 2004-03-18 HDMPL v6 Release f44739.7 2007-07-30 HDMPL v6.1 release: Methods now return genericized types where relevant
Nested Class Summary | |
---|---|
static class |
TopicProxy.Policy
A small class that represents a policy for a given topic. |
static class |
TopicProxy.QoP
A small structure that represents all the possible types of a topic's quality of protection. |
Method Summary | |
---|---|
void |
addDefaultPolicy(TopicProxy.Policy defaultPolicy)
Adds the default Topic Policy. |
void |
addPolicies(TopicProxy.Policy[] list)
Adds an array of policies to this topic's list of policies and sends the results to the Configuration Manager. |
TopicProxy |
createChildTopic(java.lang.String name)
Creates a topic of the supplied name so that it sits under the current topic. |
void |
deleteChildTopic(java.lang.String name)
Removes the topic with the supplied name (and its children) from the current topic. |
TopicProxy |
getChildTopic(java.util.Properties props)
Returns the first TopicProxy object directly (that is, one level) underneath the current one that matches the supplied filter. |
TopicProxy |
getChildTopicByName(java.lang.String topicName)
Returns the TopicProxy object with the supplied name, or null if a topic of that name does not exist or if the supplied argument was null. |
java.util.Enumeration<TopicProxy> |
getChildTopics(java.util.Properties props)
Returns an enumeration of all TopicProxy objects directly (that is, one level) underneath the current one that match the supplied filter. |
ConfigurationObjectType |
getConfigurationObjectType()
Returns the ConfigurationObjectType associated with this AdministeredObject type. |
ConfigurationObjectType |
getConfigurationObjectTypeOfParent()
Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type. |
TopicProxy.Policy |
getDefaultPolicy()
Returns the default Topic Policy. |
java.lang.String |
getMulticastEnabled()
Returns the multicast 'enabled' string associated with this topic. |
boolean |
getMulticastEncrypted()
Returns the multicast 'encrypted' flag associated with this topic. |
java.lang.String |
getMulticastIPv4GroupAddress()
Returns the IPv4 multicast group address associated with this topic. |
java.lang.String |
getMulticastIPv6GroupAddress()
This method is reserved for future use. |
boolean |
getMulticastQualityOfService()
Returns the multicast 'qualityOfService' flag associated with this topic. |
int |
getNumberOfPolicies()
Returns the number of TopicProxy.Policy objects in the topic's list, excluding any default policy. |
java.util.Enumeration |
getPolicies()
Returns a Enumeration of all the TopicProxy.Policy objects in the topic's list. |
TopicProxy.QoP |
getQualityOfProtectionLevel()
Returns the Quality of Protection level associated with this topic. |
java.lang.String |
getTopicName()
Returns the name of the topic |
void |
moveTopic(java.lang.String name,
TopicProxy newProxy)
Atomically removes the topic tree with the supplied name from the current TopicProxy and adds it to the supplied instance. |
void |
removeDefaultPolicy()
Removes the default Topic Policy. |
void |
removePolicies(TopicProxy.Policy[] list)
Removes a list of policies from this topic's list of policies and sends the results to the Configuration Manager. |
void |
setDefaultPolicy(TopicProxy.Policy defaultPolicy)
Sets the default Topic Policy. |
void |
setMulticastEnabled(java.lang.String isEnabled)
Sets the multicast 'enabled' value for the topic. |
void |
setMulticastEncrypted(boolean isEncrypted)
Sets the multicast 'encrypted' flag for the topic. |
void |
setMulticastGroupAddress(java.lang.String ipv4GroupAddress,
java.lang.String ipv6GroupAddress)
Sets the multicast group addresses for the topic. |
void |
setMulticastQualityOfService(boolean isReliable)
Sets the multicast QoS flag for the topic. |
void |
setQualityOfProtectionLevel(TopicProxy.QoP newQoP)
Sets the Quality of Protection level for the topic. |
static java.util.Properties |
withName(java.lang.String name)
Returns a new Properties object that has the Name attribute set to the supplied String, and the type attribute to be the name of the Topic class. |
static java.util.Properties |
withUUID(java.lang.String uuid)
Returns a new Properties object that has the UUID attribute set to the supplied String, and the type attribute to be the name of the Topic class. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public TopicProxy createChildTopic(java.lang.String name) throws ConfigManagerProxyLoggedException
If a topic already exists with the supplied name, the existing topic is returned.
name
- - Name of the new topic.
ConfigManagerProxyLoggedException
- if the request to
create a topic could not be sent to the Configuration Managerpublic TopicProxy getChildTopic(java.util.Properties props) throws ConfigManagerProxyPropertyNotInitializedException
props
- Filter to restrict which children to
return, based on the topics' attributes.
Each key is an attribute name of the required object
and each value is the required value of the attribute. A null or
empty Properties object will match all topics that have this
topic as a parent.
ConfigManagerProxyPropertyNotInitializedException
- if the list of topics could not be determined because the Config
Manager has not yet supplied the topic information.AttributeConstants
public TopicProxy getChildTopicByName(java.lang.String topicName) throws ConfigManagerProxyPropertyNotInitializedException
topicName
-
ConfigManagerProxyPropertyNotInitializedException
- if the list of available topics could not be determined
because the Configuration Manager did not supply the topic
information to the Configuration Manager Proxy before a timeout occurred.public java.util.Enumeration<TopicProxy> getChildTopics(java.util.Properties props) throws ConfigManagerProxyPropertyNotInitializedException
shares = { tech, retail, oil } tech = { billco, ibm } retail = { ... }...would return an Enumeration of three TopicProxy objects representing tech, retail and oil.
props
- Filter to restrict which children to
return, based on the required topics' attributes.
Each key is an attribute name of the required object
and each value is the required value of the attribute. A null or
empty Properties object will match all topics that have the
current topic as a parent.
ConfigManagerProxyPropertyNotInitializedException
- if the list of topics could not be determined because the Config
Manager has not yet supplied the topic information.public void deleteChildTopic(java.lang.String name) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException
Removes the topic with the supplied name (and its children) from the current topic. If more than one topic with the supplied name exists, all instances are removed.
name
- of the topic to delete. If null, all topics are
removed.
ConfigManagerProxyPropertyNotInitializedException
- if the list of topics could not be determined because the Config
Manager has not yet supplied the topic information.
ConfigManagerProxyLoggedException
- if the request to delete
the topics could not be sent to the Configuration Manager.public void moveTopic(java.lang.String name, TopicProxy newProxy) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException
Atomically removes the topic tree with the supplied name from the current TopicProxy and adds it to the supplied instance. Requires that a "batch" of operations (controlled using ConfigManagerProxy. beginUpdates(), clearUpdates() and sendUpdates() is NOT already in progress.
Simple checks are made to ensure that the source topic doesn't equal the target topic, and that the child name is not the target. However it is still possible to end up with circular references if you try to copy a topic tree into one of its children. Such a call may succeed and you might find that some topics can no longer be referenced. Hence, care should be taken by the caller to ensure that this does not happen.
name
- The name of the Subtopic to remove from this TopicProxynewProxy
- - The TopicProxy to which the broker should be added.
ConfigManagerProxyPropertyNotInitializedException
- if the
topic corresponding to the supplied name could not be loaded because
information on the parent topic (i.e. this) has not yet been supplied.
ConfigManagerProxyLoggedException
- if the topic with the supplied
name does not exist as a child of the current topic, if a batch of requests
was already in progress, if the child name and the target are the same,
if the target is the same as the current topic, or if the message to move
could not be sent to the Configuration Manager.public java.lang.String getTopicName() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the list of topics could not be determined because the Config
Manager has not yet supplied the topic information.public TopicProxy.QoP getQualityOfProtectionLevel() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the list of topics could not be determined because the Config
Manager has not yet supplied the topic information.public java.lang.String getMulticastEnabled() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the property could not be determined because the Config
Manager has not yet supplied the topic information.public java.lang.String getMulticastIPv4GroupAddress() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the property could not be determined because the Config
Manager has not yet supplied the topic information.public java.lang.String getMulticastIPv6GroupAddress() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
public boolean getMulticastEncrypted() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the property could not be determined because the Config
Manager has not yet supplied the topic information.public boolean getMulticastQualityOfService() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the property could not be determined because the Config
Manager has not yet supplied the topic information.public TopicProxy.Policy getDefaultPolicy() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- If the
default policy has not been supplied to us from the Configuration
Manager.public void setQualityOfProtectionLevel(TopicProxy.QoP newQoP) throws ConfigManagerProxyLoggedException
newQoP
- - The new Quality of Protection level (TopicProxy.QoP.none,
TopicProxy.QoP.channelIntegrity, TopicProxy.QoP.messageIntegrity or
TopicProxy.QoP.encrypted).
ConfigManagerProxyLoggedException
- if the request could not be
sent to the Configuration Manager, or if the supplied argument was
TopicProxy.QoP.unknown.public void setMulticastEnabled(java.lang.String isEnabled) throws ConfigManagerProxyLoggedException
isEnabled
- the requested value of the
multicastEnabled flag.
ConfigManagerProxyLoggedException
- if the request
could not be sent to the Configuration Manager.public void setMulticastGroupAddress(java.lang.String ipv4GroupAddress, java.lang.String ipv6GroupAddress) throws ConfigManagerProxyLoggedException
ipv4GroupAddress
- IPv4 group address for this topic.ipv6GroupAddress
- Reserved for future use. Do not
set this parameter to anything other than null or the
empty string.
ConfigManagerProxyLoggedException
- if the request
could not be sent to the Configuration Manager.public void setMulticastEncrypted(boolean isEncrypted) throws ConfigManagerProxyLoggedException
isEncrypted
- True if and only if the topic is
encrypted.
ConfigManagerProxyLoggedException
- if the request
could not be sent to the Configuration Manager.public void setMulticastQualityOfService(boolean isReliable) throws ConfigManagerProxyLoggedException
isReliable
- True if and only if the topic has
reliable quality of service.
ConfigManagerProxyLoggedException
- if the request
could not be sent to the Configuration Manager.public void setDefaultPolicy(TopicProxy.Policy defaultPolicy) throws ConfigManagerProxyLoggedException
defaultPolicy
- Containing the default policy values.
ConfigManagerProxyLoggedException
- if the request could not be sent
to the Configuration Manager.public void addDefaultPolicy(TopicProxy.Policy defaultPolicy) throws ConfigManagerProxyLoggedException
defaultPolicy
- Containing the default policy values.
ConfigManagerProxyLoggedException
- if the request could
not be sent to the Configuration Manager.public void removeDefaultPolicy() throws ConfigManagerProxyLoggedException
ConfigManagerProxyLoggedException
- if the request could
not be sent to the Configuration Manager.public static java.util.Properties withUUID(java.lang.String uuid)
public static java.util.Properties withName(java.lang.String name)
public ConfigurationObjectType getConfigurationObjectType()
getConfigurationObjectType
in class AdministeredObject
public ConfigurationObjectType getConfigurationObjectTypeOfParent()
getConfigurationObjectTypeOfParent
in class AdministeredObject
public java.util.Enumeration getPolicies() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the requested property is not yet known.public int getNumberOfPolicies() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the requested property is not yet known.public void addPolicies(TopicProxy.Policy[] list) throws ConfigManagerProxyLoggedException
Adds an array of policies to this topic's list of policies and sends the results to the Configuration Manager.
list
- set of policies to add to the TopicProxy.
ConfigManagerProxyLoggedException
- if the new list of policies
could not be sent to the Configuration Manager.public void removePolicies(TopicProxy.Policy[] list) throws ConfigManagerProxyLoggedException, ConfigManagerProxyPropertyNotInitializedException
Removes a list of policies from this topic's list of policies and sends the results to the Configuration Manager.
list
- set of policies to remove from the TopicProxy.
ConfigManagerProxyLoggedException
- if the new list of policies
could not be sent to the Configuration Manager.
ConfigManagerProxyPropertyNotInitializedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |