FileDocCategorySizeDatePackage
ConnectorMetaData.javaAPI DocJBoss 4.2.110643Fri Jul 13 21:01:18 BST 2007org.jboss.resource.metadata

ConnectorMetaData

public class ConnectorMetaData extends ConfigPropertyMetaDataContainer
Connector meta data
author
Adrian Brock
version
$Revision: 57189 $

Fields Summary
private static final long
serialVersionUID
private String
version
The version
private String
vendorName
The vendor name
private String
eisType
The eis type
private String
raVersion
The resource adapter version
private String
raClass
The resource adapter class
private boolean
reauthenticationSupport
Reauthentication support
private LicenseMetaData
lmd
The license
private EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap
descriptions
The descriptions
private HashSet
connectionDefinitions
The connection definitions
private TransactionSupportMetaData
tsmd
The transaction support meta data
private AuthenticationMechanismMetaData
ammd
The authentication mechanism meta data
private HashSet
listeners
The message listeners
private HashSet
adminObjects
The admin objects
private HashSet
securityPermissions
The security permissions
Constructors Summary
public ConnectorMetaData()


    
   
      DescriptionGroupMetaData dmd = new DescriptionGroupMetaData();
      descriptions.put(dmd.getLanguage(), dmd);
   
Methods Summary
public voidaddAdminObject(AdminObjectMetaData aomd)
Add an administered object

param
aomd the administered object

      adminObjects.add(aomd);
   
public voidaddConnectionDefinition(ConnectionDefinitionMetaData cdmd)
Add a connection definition

param
cdmd the connection definition

      connectionDefinitions.add(cdmd);
   
public voidaddDescription(DescriptionGroupMetaData dmd)
Add a description

param
dmd the description

      descriptions.put(dmd.getLanguage(), dmd);
   
public voidaddMessageListener(MessageListenerMetaData mlmd)
Add a message listener

param
mlmd the message listener

      listeners.add(mlmd);
   
public voidaddSecurityPermission(SecurityPermissionMetaData spmd)
Add a security permission

param
spmd the security permission

      securityPermissions.add(spmd);
   
public AdminObjectMetaDatagetAdminObject(java.lang.String interfaceName)
Get the admin object

param
interfaceName the identifying admin object interface
return
the metadata or null if there isn't one

      for (Iterator i = adminObjects.iterator(); i.hasNext();)
      {
         AdminObjectMetaData aomd = (AdminObjectMetaData) i.next();
         if (aomd.getAdminObjectInterfaceClass().equals(interfaceName))
            return aomd;
      }
      return null;
   
public AuthenticationMechanismMetaDatagetAuthenticationMechanism()
Get the authentication mechanism

return
the authentication mechanism

      return ammd;
   
public ConnectionDefinitionMetaDatagetConnectionDefinition(java.lang.String connectionDefinition)
Get the connection definition

param
connectionDefinition the idenitifying factory
return
the metadata or null if there isn't one

      for (Iterator i = connectionDefinitions.iterator(); i.hasNext();)
      {
         ConnectionDefinitionMetaData cdmd = (ConnectionDefinitionMetaData) i.next();
         if (cdmd.getConnectionFactoryInterfaceClass().equals(connectionDefinition))
            return cdmd;
      }
      return null;
   
public DescriptionGroupMetaDatagetDescription()
Get the description for the default language

return
the description for the default langugage

      DescriptionGroupMetaData dgmd = (DescriptionGroupMetaData) descriptions.get(Locale.getDefault().getLanguage());
      // No description using the default locale, just use the first
      if (dgmd == null)
      {
         for (Iterator i = descriptions.values().iterator(); i.hasNext();)
         {
            dgmd = (DescriptionGroupMetaData) i.next();
            break;
         }
      }
      return dgmd;
   
public DescriptionGroupMetaDatagetDescription(java.lang.String lang)
Get the description for the give language

param
lang the language
return
the description

      return (DescriptionGroupMetaData) descriptions.get(lang);
   
public java.lang.StringgetEISType()
Get the eis type

return
the eis type

      return eisType;
   
public LicenseMetaDatagetLicense()
Get the license

return
the license

      return lmd;
   
public MessageListenerMetaDatagetMessageListener(java.lang.String messagingType)
Get the message listener

param
messagingType the identifying listener interface
return
the metadata or null if there isn't one

      for (Iterator i = listeners.iterator(); i.hasNext();)
      {
         MessageListenerMetaData mlmd = (MessageListenerMetaData) i.next();
         if (mlmd.getType().equals(messagingType))
            return mlmd;
      }
      return null;
   
public java.lang.StringgetRAClass()
Get the resource adapter class

return
the resource adapter class

      return raClass;
   
public java.lang.StringgetRAVersion()
Get the resource adapter version

return
the resource adapter version

      return raVersion;
   
public booleangetReauthenticationSupport()
Get the reauthentication support

return
the reauthentication support

      return reauthenticationSupport;
   
public TransactionSupportMetaDatagetTransactionSupport()
Get the transaction support

return
the transaction support

      return tsmd;
   
public java.lang.StringgetVendorName()
Get the vendor name

return
the vendor name

      return vendorName;
   
public java.lang.StringgetVersion()
Get the connector version

return
the connector version

      return version;
   
public voidsetAuthenticationMechansim(AuthenticationMechanismMetaData ammd)
Set the authentication mechansim

param
ammd the authentication mechansim

      this.ammd = ammd;
   
public voidsetEISType(java.lang.String eisType)
Set the eis Type

param
eisType the eis type

      this.eisType = eisType;
   
public voidsetRAClass(java.lang.String raClass)
Set the resource adapter class

param
raClass the resource adapter class

      this.raClass = raClass;
   
public voidsetRAVersion(java.lang.String version)
Set the resource adapter version

param
version the resource adapter version

      this.raVersion = version;
   
public voidsetReauthenticationSupport(boolean reauthenticationSupport)
Set the reauthentication support

param
reauthenticationSupport true for support, false otherwise

      this.reauthenticationSupport = reauthenticationSupport;
   
public voidsetTransactionSupport(TransactionSupportMetaData tsmd)
Set the transaction support

param
tsmd the transaction support

      this.tsmd = tsmd;
   
public voidsetVendorName(java.lang.String vendorName)
Set the vendor name

param
vendorName the vendor name

      this.vendorName = vendorName;
   
public voidsetVersion(java.lang.String version)
Set the connector version

param
version the connector version

      this.version = version;
   
public java.lang.StringtoString()

      StringBuffer buffer = new StringBuffer();
      buffer.append("ConnectorMetaData").append('@");
      buffer.append(Integer.toHexString(System.identityHashCode(this)));
      buffer.append("[version=").append(version);
      buffer.append(" vendorName=").append(vendorName);
      buffer.append(" eisType=").append(eisType);
      buffer.append(" resourceAdapterVersion=").append(raVersion);
      buffer.append(" resourceAdapterClass=").append(raClass);
      buffer.append(" license=").append(lmd);
      buffer.append(" properties=").append(getProperties());
      buffer.append(" descriptions=").append(descriptions.values());
      buffer.append(" connectionDefinitions=").append(connectionDefinitions);
      buffer.append(" transactionSupport=").append(tsmd);
      buffer.append(" authenticationMechanism=").append(ammd);
      buffer.append(" reauthenticationSupport=").append(reauthenticationSupport);
      buffer.append(" messageListeners=").append(listeners);
      buffer.append(" adminobjects=").append(adminObjects);
      buffer.append(" securityPermissions=").append(securityPermissions);
      buffer.append(']");
      return buffer.toString();