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 providedJmsService
to 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 void
addMQUrl(JmsHost host)
Creates an instance of MQUrl from JmsHost element in the dtd and add it to the addresslist.static MQUrl
createUrl(JmsHost host, JmsService js)
static MQUrl
createUrl(JmsHost host, JmsService js, String overridedHostName)
Cluster
getClusterByName(String clusterName)
Cluster
getClusterForServer(String instanceName)
JmsHost
getDefaultJmsHost(JmsService jmsService)
String
getHostNameFromDasProperties()
String
getMasterBroker(String clustername)
String
getNodeHostName(Server as)
Map<String,JmsHost>
getResolvedLocalJmsHostsInMyCluster(boolean includeMe)
Server[]
getServersInCluster(Cluster cluster)
Server[]
getServersInCluster(String clusterName)
int
getSize()
protected String
getSystemProperty(String propertyName)
boolean
isAConfig(String targetName)
boolean
isClustered()
boolean
isDAS(String targetName)
void
removeMQUrl(JmsHost host)
Deletes the url represented by the JmsHost from the AddressList.void
setInstanceName(String instanceName)
void
setJmsService(JmsService jmsService)
void
setTargetName(String targetName)
void
setup()
void
setup(boolean isClustered)
Sets up the addresslist.String
toString()
Creates a String representation of address list from array list.void
updateMQUrl(JmsHost host)
Updates the information about theJmsHost
in the address list.
-
-
-
Constructor Detail
-
MQAddressList
public MQAddressList()
Create an empty address list
-
MQAddressList
public MQAddressList(JmsService service)
Use the providedJmsService
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 createdservice
-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()
-
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 ofJmsHost
object.
-
removeMQUrl
public void removeMQUrl(JmsHost host)
Deletes the url represented by the JmsHost from the AddressList.- Parameters:
host
- An instance ofJmsHost
object.
-
updateMQUrl
public void updateMQUrl(JmsHost host)
Updates the information about theJmsHost
in the address list.- Parameters:
host
- An instance ofJmsHost
object.
-
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()
-
-