com.sun.enterprise.connectors.jms.system
Class MQAddressList

java.lang.Object
  extended by com.sun.enterprise.connectors.jms.system.MQAddressList

public class MQAddressList
extends java.lang.Object

Defines an MQ addressList.

Author:
Binod P.G

Constructor Summary
MQAddressList()
          Create an empty address list
MQAddressList(JmsService service)
          Use the provided JmsService to create an addresslist
MQAddressList(JmsService service, java.lang.String targetName)
          Creates an instance from jmsService and resolves values using the provided target name
 
Method Summary
 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, java.lang.String overridedHostName)
           
 Cluster getClusterByName(java.lang.String clusterName)
           
 Cluster getClusterForServer(java.lang.String instanceName)
           
 JmsHost getDefaultJmsHost(JmsService jmsService)
           
 java.lang.String getHostNameFromDasProperties()
           
 java.lang.String getMasterBroker(java.lang.String clustername)
           
 java.lang.String getNodeHostName(Server as)
           
 java.util.Map<java.lang.String,JmsHost> getResolvedLocalJmsHostsInMyCluster(boolean includeMe)
           
 Server[] getServersInCluster(Cluster cluster)
           
 Server[] getServersInCluster(java.lang.String clusterName)
           
 int getSize()
           
protected  java.lang.String getSystemProperty(java.lang.String propertyName)
           
 boolean isAConfig(java.lang.String targetName)
           
 boolean isClustered()
           
 boolean isDAS(java.lang.String targetName)
           
 void removeMQUrl(JmsHost host)
          Deletes the url represented by the JmsHost from the AddressList.
 void setInstanceName(java.lang.String instanceName)
           
 void setJmsService(JmsService jmsService)
           
 void setTargetName(java.lang.String targetName)
           
 void setup()
           
 void setup(boolean isClustered)
          Sets up the addresslist.
 java.lang.String toString()
          Creates a String representation of address list from array list.
 void updateMQUrl(JmsHost host)
          Updates the information about the JmsHost in the address list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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,
                     java.lang.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(java.lang.String targetName)

setInstanceName

public void setInstanceName(java.lang.String instanceName)

setup

public void setup()
           throws java.lang.Exception
Throws:
java.lang.Exception

setup

public void setup(boolean isClustered)
           throws java.lang.Exception
Sets up the addresslist.

Throws:
java.lang.Exception

getNodeHostName

public java.lang.String getNodeHostName(Server as)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getHostNameFromDasProperties

public java.lang.String getHostNameFromDasProperties()

getSystemProperty

protected java.lang.String getSystemProperty(java.lang.String propertyName)

getMasterBroker

public java.lang.String getMasterBroker(java.lang.String clustername)

getClusterByName

public Cluster getClusterByName(java.lang.String clusterName)

getServersInCluster

public Server[] getServersInCluster(java.lang.String clusterName)

getServersInCluster

public Server[] getServersInCluster(Cluster cluster)

isDAS

public boolean isDAS(java.lang.String targetName)

isAConfig

public boolean isAConfig(java.lang.String targetName)

getResolvedLocalJmsHostsInMyCluster

public java.util.Map<java.lang.String,JmsHost> getResolvedLocalJmsHostsInMyCluster(boolean includeMe)

getClusterForServer

public Cluster getClusterForServer(java.lang.String instanceName)

toString

public java.lang.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 java.lang.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.

createUrl

public static MQUrl createUrl(JmsHost host,
                              JmsService js)

createUrl

public static MQUrl createUrl(JmsHost host,
                              JmsService js,
                              java.lang.String overridedHostName)

getDefaultJmsHost

public JmsHost getDefaultJmsHost(JmsService jmsService)

isClustered

public boolean isClustered()

getSize

public int getSize()


Copyright © 2012 GlassFish Community. All Rights Reserved.