Class MQAddressList
- java.lang.Object
-
- com.sun.enterprise.connectors.jms.system.MQAddressList
-
public class MQAddressList extends Object
Defines an MQ addressList.- Author:
- Binod P.G
-
-
Constructor Summary
Constructors Constructor Description MQAddressList()Create an empty address listMQAddressList(JmsService service)Use the providedJmsServiceto create an addresslistMQAddressList(JmsService service, String targetName)Creates an instance from jmsService and resolves values using the provided target name
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMQUrl(JmsHost host)Creates an instance of MQUrl from JmsHost element in the dtd and add it to the addresslist.static MQUrlcreateUrl(JmsHost host, JmsService js)static MQUrlcreateUrl(JmsHost host, JmsService js, String overridedHostName)ClustergetClusterByName(String clusterName)ClustergetClusterForServer(String instanceName)JmsHostgetDefaultJmsHost(JmsService jmsService)StringgetHostNameFromDasProperties()StringgetMasterBroker(String clustername)StringgetNodeHostName(Server as)Map<String,JmsHost>getResolvedLocalJmsHostsInMyCluster(boolean includeMe)Server[]getServersInCluster(Cluster cluster)Server[]getServersInCluster(String clusterName)intgetSize()protected StringgetSystemProperty(String propertyName)booleanisAConfig(String targetName)booleanisClustered()booleanisDAS(String targetName)voidremoveMQUrl(JmsHost host)Deletes the url represented by the JmsHost from the AddressList.voidsetInstanceName(String instanceName)voidsetJmsService(JmsService jmsService)voidsetTargetName(String targetName)voidsetup()voidsetup(boolean isClustered)Sets up the addresslist.StringtoString()Creates a String representation of address list from array list.voidupdateMQUrl(JmsHost host)Updates the information about theJmsHostin the address list.
-
-
-
Constructor Detail
-
MQAddressList
public MQAddressList()
Create an empty address list
-
MQAddressList
public MQAddressList(JmsService service)
Use the providedJmsServiceto 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 createdservice-JmsServiceinstance.
-
-
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 ExceptionSets up the addresslist.- Throws:
Exception
-
getHostNameFromDasProperties
public String getHostNameFromDasProperties()
-
isDAS
public boolean isDAS(String targetName)
-
isAConfig
public boolean isAConfig(String targetName)
-
getResolvedLocalJmsHostsInMyCluster
public Map<String,JmsHost> getResolvedLocalJmsHostsInMyCluster(boolean includeMe)
-
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.
-
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 ofJmsHostobject.
-
removeMQUrl
public void removeMQUrl(JmsHost host)
Deletes the url represented by the JmsHost from the AddressList.- Parameters:
host- An instance ofJmsHostobject.
-
updateMQUrl
public void updateMQUrl(JmsHost host)
Updates the information about theJmsHostin the address list.- Parameters:
host- An instance ofJmsHostobject.
-
createUrl
public static MQUrl createUrl(JmsHost host, JmsService js)
-
createUrl
public static MQUrl createUrl(JmsHost host, JmsService js, String overridedHostName)
-
getDefaultJmsHost
public JmsHost getDefaultJmsHost(JmsService jmsService)
-
isClustered
public boolean isClustered()
-
getSize
public int getSize()
-
-