View Javadoc

    1   /***
    2    *
    3    * Copyright 2004 Protique Ltd
    4    *
    5    * Licensed under the Apache License, Version 2.0 (the "License");
    6    * you may not use this file except in compliance with the License.
    7    * You may obtain a copy of the License at
    8    *
    9    * http://www.apache.org/licenses/LICENSE-2.0
    10   *
    11   * Unless required by applicable law or agreed to in writing, software
    12   * distributed under the License is distributed on an "AS IS" BASIS,
    13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14   * See the License for the specific language governing permissions and
    15   * limitations under the License.
    16   *
    17   **/
    18  package org.codehaus.activemq;
    19
    20  import javax.jms.ConnectionMetaData;
    21  import javax.jms.JMSException;
    22  import java.util.Enumeration;
    23  import java.util.Hashtable;
    24
    25  /***
    26   * A <CODE>ConnectionMetaData</CODE> object provides information describing
    27   * the <CODE>Connection</CODE> object.
    28   */
    29
    30  public class ActiveMQConnectionMetaData implements ConnectionMetaData {
    31
    32      /***
    33       * Gets the JMS API version.
    34       *
    35       * @return the JMS API version
    36       */
    37
    38      public String getJMSVersion() {
    39          return "1.1";
    40      }
    41
    42      /***
    43       * Gets the JMS major version number.
    44       *
    45       * @return the JMS API major version number
    46       */
    47
    48      public int getJMSMajorVersion() {
    49          return 1;
    50      }
    51
    52      /***
    53       * Gets the JMS minor version number.
    54       *
    55       * @return the JMS API minor version number
    56       */
    57
    58      public int getJMSMinorVersion() {
    59          return 1;
    60      }
    61
    62      /***
    63       * Gets the JMS provider name.
    64       *
    65       * @return the JMS provider name
    66       */
    67
    68      public String getJMSProviderName() {
    69          return "Protique";
    70      }
    71
    72      /***
    73       * Gets the JMS provider version.
    74       *
    75       * @return the JMS provider version
    76       */
    77
    78      public String getProviderVersion() {
    79          return "1.1";
    80      }
    81
    82      /***
    83       * Gets the JMS provider major version number.
    84       *
    85       * @return the JMS provider major version number
    86       */
    87
    88      public int getProviderMajorVersion() {
    89          return 1;
    90      }
    91
    92      /***
    93       * Gets the JMS provider minor version number.
    94       *
    95       * @return the JMS provider minor version number
    96       */
    97
    98      public int getProviderMinorVersion() {
    99          return 1;
    100     }
    101
    102     /***
    103      * Gets an enumeration of the JMSX property names.
    104      *
    105      * @return an Enumeration of JMSX property names
    106      */
    107
    108     public Enumeration getJMSXPropertyNames() {
    109         Hashtable jmxProperties = new Hashtable();
    110         jmxProperties.put("JMSXGroupID", "1");
    111         jmxProperties.put("JMSXGroupSeq", "1");
    112
    113         return jmxProperties.keys();
    114     }
    115 }