FileDocCategorySizeDatePackage
JmsMCFProperties.javaAPI DocJBoss 4.2.14729Fri Jul 13 21:01:16 BST 2007org.jboss.resource.adapter.jms

JmsMCFProperties

public class JmsMCFProperties extends Object implements Serializable
The MCF default properties, settable in ra.xml or in deployer.
author
Peter Antman
author
Adrian Brock
version
$Revision: 57189 $

Fields Summary
static final long
serialVersionUID
public static final String
QUEUE_TYPE
public static final String
TOPIC_TYPE
String
userName
String
password
String
clientID
String
providerJNDI
int
type
Constructors Summary
public JmsMCFProperties()

   
    
   
      // empty
   
Methods Summary
public booleanequals(java.lang.Object obj)
Test for equality of all attributes.

      if (obj == null) return false;
      
      if (obj instanceof JmsMCFProperties)
      {
         JmsMCFProperties you = (JmsMCFProperties) obj;
         return (Strings.compare(userName, you.getUserName()) &&
                 Strings.compare(password, you.getPassword()) &&
                 Strings.compare(providerJNDI, you.getProviderJNDI()) &&
                 this.type == you.type);
      }
      
      return false;
   
public java.lang.StringgetClientID()
Get client id, may be null.

      return clientID;
   
public java.lang.StringgetPassword()
Get password, may be null.

      return password;
   
public java.lang.StringgetProviderJNDI()
Get providerJNDI. May not be null.

      return providerJNDI;
   
public java.lang.StringgetSessionDefaultType()

      if (type == JmsConnectionFactory.BOTH)
         return "both";
      else if (type == JmsConnectionFactory.QUEUE)
         return TOPIC_TYPE;
      else
         return QUEUE_TYPE;
   
public intgetType()
Type of the JMS Session.

      return type;
   
public java.lang.StringgetUserName()
Get userName, may be null.

      return userName;
   
public inthashCode()
Simple hashCode of all attributes.

      // FIXME
      String result = "" + userName + password + providerJNDI + type;
      return result.hashCode();
   
public voidsetClientID(java.lang.String clientID)
Set client id, null by default.

      this.clientID = clientID;
   
public voidsetPassword(java.lang.String password)
Set password, null by default.

      this.password = password;
   
public voidsetProviderJNDI(java.lang.String providerJNDI)
Set providerJNDI, the JMS provider adapter to use.

Defaults to java:DefaultJMSProvider.

      this.providerJNDI  = providerJNDI;
   
public voidsetSessionDefaultType(java.lang.String type)
Helper method to set the default session type.

param
type either javax.jms.Topic or javax.jms.Queue
exception
ResourceException if type was not a valid type.

      if (type.equals(QUEUE_TYPE))
         this.type = JmsConnectionFactory.QUEUE;
      else if(type.equals(TOPIC_TYPE))
         this.type = JmsConnectionFactory.TOPIC;
      else
         this.type = JmsConnectionFactory.BOTH;
   
public voidsetType(int type)
Set the default session type.

      this.type = type;
   
public voidsetUserName(java.lang.String userName)
Set userName, null by default.

      this.userName = userName;