Class MQAddressList


  • public class MQAddressList
    extends Object
    Defines an MQ addressList.
    Author:
    Binod P.G
    • Constructor Detail

      • MQAddressList

        public MQAddressList()
        Create an empty address list
      • MQAddressList

        public MQAddressList​(JmsService service)
        Use the provided JmsService to create an addresslist
      • MQAddressList

        public MQAddressList​(JmsService service,
                             String targetName)
        Creates an instance from jmsService and resolves values using the provided target name
        Parameters:
        targetName - Represents the target for which the addresslist needs to be created
        service - JmsService instance.
    • Method Detail

      • setJmsService

        public void setJmsService​(JmsService jmsService)
      • setTargetName

        public void setTargetName​(String targetName)
      • setInstanceName

        public void setInstanceName​(String instanceName)
      • setup

        public void setup​(boolean isClustered)
                   throws Exception
        Sets up the addresslist.
        Throws:
        Exception
      • getHostNameFromDasProperties

        public String getHostNameFromDasProperties()
      • getSystemProperty

        protected String getSystemProperty​(String propertyName)
      • getMasterBroker

        public String getMasterBroker​(String clustername)
      • getClusterByName

        public Cluster getClusterByName​(String clusterName)
      • getServersInCluster

        public Server[] getServersInCluster​(String clusterName)
      • getServersInCluster

        public Server[] getServersInCluster​(Cluster cluster)
      • isDAS

        public boolean isDAS​(String targetName)
      • isAConfig

        public boolean isAConfig​(String targetName)
      • getResolvedLocalJmsHostsInMyCluster

        public Map<String,​JmsHost> getResolvedLocalJmsHostsInMyCluster​(boolean includeMe)
      • getClusterForServer

        public Cluster getClusterForServer​(String instanceName)
      • toString

        public String toString()
        Creates a String representation of address list from array list. In short, it is a comma separated list. Actual syntax of an MQ url is inside MQUrl class.
        Overrides:
        toString in class Object
        Returns:
        AddressList String
        See Also:
        MQUrl
      • addMQUrl

        public void addMQUrl​(JmsHost host)
        Creates an instance of MQUrl from JmsHost element in the dtd and add it to the addresslist.
        Parameters:
        host - An instance of JmsHost object.
      • removeMQUrl

        public void removeMQUrl​(JmsHost host)
        Deletes the url represented by the JmsHost from the AddressList.
        Parameters:
        host - An instance of JmsHost object.
      • updateMQUrl

        public void updateMQUrl​(JmsHost host)
        Updates the information about the JmsHost in the address list.
        Parameters:
        host - An instance of JmsHost object.
      • isClustered

        public boolean isClustered()
      • getSize

        public int getSize()