Package org.apache.beehive.controls.system.jms

Source Code of org.apache.beehive.controls.system.jms.JMSControlBeanBeanInfo

package org.apache.beehive.controls.system.jms;

import java.beans.BeanDescriptor;
import java.beans.EventSetDescriptor;
import java.beans.IntrospectionException;
import java.beans.MethodDescriptor;
import java.beans.ParameterDescriptor;
import java.beans.PropertyDescriptor;
import java.beans.PropertyEditor;
import java.lang.reflect.Method;
import java.util.HashMap;

import org.apache.beehive.controls.api.ControlException;
import org.apache.beehive.controls.runtime.bean.BeanPersistenceDelegate;
import org.apache.beehive.controls.runtime.packaging.ControlEventSetDescriptor;

@SuppressWarnings("all")
public class JMSControlBeanBeanInfo
extends org.apache.beehive.controls.runtime.bean.ControlBeanInfo
{
    static final Method _getDestinationMethod;
    static final Method _setPropertyMethod;
    static final Method _setHeaderMethod;
    static final Method _setPropertiesMethod;
    static final Method _getSessionMethod;
    static final Method _getConnectionMethod;
    static final Method _setHeadersMethod;
   
    //
    // This HashMap will map from a Method to the array of names for parameters of the
    // method.  This is necessary because parameter name data isn't carried along in the
    // class file, but if available can enable ease of use by referencing parameters by
    // the declared name (vs. by index).
    //
    // This map should be read-only after its initialization in the static block, hence
    // using a plain HashMap is thread-safe.
    //
    static HashMap<Method, String []> _methodParamMap = new HashMap<Method, String []>();
   
    static
    {
       
       
        try
        {
            _getDestinationMethod = org.apache.beehive.controls.system.jms.JMSControl.class.getMethod("getDestination", new Class [] {});
            _methodParamMap.put(_getDestinationMethod, new String [] {  });
            _setPropertyMethod = org.apache.beehive.controls.system.jms.JMSControl.class.getMethod("setProperty", new Class [] {java.lang.String.class, java.lang.Object.class});
            _methodParamMap.put(_setPropertyMethod, new String [] { "name", "value" });
            _setHeaderMethod = org.apache.beehive.controls.system.jms.JMSControl.class.getMethod("setHeader", new Class [] {org.apache.beehive.controls.system.jms.JMSControl.HeaderType.class, java.lang.Object.class});
            _methodParamMap.put(_setHeaderMethod, new String [] { "type", "value" });
            _setPropertiesMethod = org.apache.beehive.controls.system.jms.JMSControl.class.getMethod("setProperties", new Class [] {java.util.Map.class});
            _methodParamMap.put(_setPropertiesMethod, new String [] { "properties" });
            _getSessionMethod = org.apache.beehive.controls.system.jms.JMSControl.class.getMethod("getSession", new Class [] {});
            _methodParamMap.put(_getSessionMethod, new String [] {  });
            _getConnectionMethod = org.apache.beehive.controls.system.jms.JMSControl.class.getMethod("getConnection", new Class [] {});
            _methodParamMap.put(_getConnectionMethod, new String [] {  });
            _setHeadersMethod = org.apache.beehive.controls.system.jms.JMSControl.class.getMethod("setHeaders", new Class [] {java.util.Map.class});
            _methodParamMap.put(_setHeadersMethod, new String [] { "headers" });
        }
        catch (NoSuchMethodException __bc_nsme)
        {
            throw new ExceptionInInitializerError(__bc_nsme);
        }
    }
   
    /**
    * Default null-arg constructor used to create a new BeanInfo instance
    */
    public JMSControlBeanBeanInfo()
    {
        super(org.apache.beehive.controls.system.jms.JMSControlBean.class);
    }
   
    /**
    * Protected constructor used if this BeanInfo class is extended.
    */
    protected JMSControlBeanBeanInfo(Class beanClass)
    {
        super(beanClass);
    }
   
    // java.beans.BeanInfo.getBeanDescriptor
    public BeanDescriptor getBeanDescriptor()
    {
        BeanDescriptor bd = new BeanDescriptor(org.apache.beehive.controls.system.jms.JMSControlBean.class);
        bd.setName( "JMSControlBean" );
        bd.setDisplayName( "JMSControlBean" );
       
        //
        // The org.apache.beehive.controls.runtime.bean.BeanPersistenceDelegate class
        // implements the XMLDecode delegation model for all Control JavaBean types. It
        // provides optimized XML persistance based upon the Control runtime architecture.
        // The 'persistenceDelegate' attribute of a BeanDescriptor is used by XMLEncoder to
        // locate a delegate for a particular JavaBean type.
        //
        bd.setValue("persistenceDelegate", new BeanPersistenceDelegate());
       
        return bd;
    }
   
    /**
    * Stores MethodDescriptor descriptors for this bean and its superclasses into
    * an array, starting at the specified index
    */
    protected void initMethodDescriptors(MethodDescriptor [] methodDescriptors, int index)
    throws java.beans.IntrospectionException
    {
        String [] __bc_paramNames;
        ParameterDescriptor [] __bc_paramDescriptors;
        MethodDescriptor md;
       
        //
        // Declare MethodDescriptor for getDestination()
        //
        __bc_paramNames = _methodParamMap.get(_getDestinationMethod);
        __bc_paramDescriptors = new ParameterDescriptor[__bc_paramNames.length];
        for (int j = 0; j < __bc_paramNames.length; j++)
        {
            __bc_paramDescriptors[j] = new ParameterDescriptor();
            __bc_paramDescriptors[j].setName(__bc_paramNames[j]);
            __bc_paramDescriptors[j].setDisplayName(__bc_paramNames[j]);
        }
        md = new MethodDescriptor(_getDestinationMethod, __bc_paramDescriptors);
        methodDescriptors[index++] = md;
       
        //
        // Declare MethodDescriptor for setProperty(name, value)
        //
        __bc_paramNames = _methodParamMap.get(_setPropertyMethod);
        __bc_paramDescriptors = new ParameterDescriptor[__bc_paramNames.length];
        for (int j = 0; j < __bc_paramNames.length; j++)
        {
            __bc_paramDescriptors[j] = new ParameterDescriptor();
            __bc_paramDescriptors[j].setName(__bc_paramNames[j]);
            __bc_paramDescriptors[j].setDisplayName(__bc_paramNames[j]);
        }
        md = new MethodDescriptor(_setPropertyMethod, __bc_paramDescriptors);
        methodDescriptors[index++] = md;
       
        //
        // Declare MethodDescriptor for setHeader(type, value)
        //
        __bc_paramNames = _methodParamMap.get(_setHeaderMethod);
        __bc_paramDescriptors = new ParameterDescriptor[__bc_paramNames.length];
        for (int j = 0; j < __bc_paramNames.length; j++)
        {
            __bc_paramDescriptors[j] = new ParameterDescriptor();
            __bc_paramDescriptors[j].setName(__bc_paramNames[j]);
            __bc_paramDescriptors[j].setDisplayName(__bc_paramNames[j]);
        }
        md = new MethodDescriptor(_setHeaderMethod, __bc_paramDescriptors);
        methodDescriptors[index++] = md;
       
        //
        // Declare MethodDescriptor for setProperties(properties)
        //
        __bc_paramNames = _methodParamMap.get(_setPropertiesMethod);
        __bc_paramDescriptors = new ParameterDescriptor[__bc_paramNames.length];
        for (int j = 0; j < __bc_paramNames.length; j++)
        {
            __bc_paramDescriptors[j] = new ParameterDescriptor();
            __bc_paramDescriptors[j].setName(__bc_paramNames[j]);
            __bc_paramDescriptors[j].setDisplayName(__bc_paramNames[j]);
        }
        md = new MethodDescriptor(_setPropertiesMethod, __bc_paramDescriptors);
        methodDescriptors[index++] = md;
       
        //
        // Declare MethodDescriptor for getSession()
        //
        __bc_paramNames = _methodParamMap.get(_getSessionMethod);
        __bc_paramDescriptors = new ParameterDescriptor[__bc_paramNames.length];
        for (int j = 0; j < __bc_paramNames.length; j++)
        {
            __bc_paramDescriptors[j] = new ParameterDescriptor();
            __bc_paramDescriptors[j].setName(__bc_paramNames[j]);
            __bc_paramDescriptors[j].setDisplayName(__bc_paramNames[j]);
        }
        md = new MethodDescriptor(_getSessionMethod, __bc_paramDescriptors);
        methodDescriptors[index++] = md;
       
        //
        // Declare MethodDescriptor for getConnection()
        //
        __bc_paramNames = _methodParamMap.get(_getConnectionMethod);
        __bc_paramDescriptors = new ParameterDescriptor[__bc_paramNames.length];
        for (int j = 0; j < __bc_paramNames.length; j++)
        {
            __bc_paramDescriptors[j] = new ParameterDescriptor();
            __bc_paramDescriptors[j].setName(__bc_paramNames[j]);
            __bc_paramDescriptors[j].setDisplayName(__bc_paramNames[j]);
        }
        md = new MethodDescriptor(_getConnectionMethod, __bc_paramDescriptors);
        methodDescriptors[index++] = md;
       
        //
        // Declare MethodDescriptor for setHeaders(headers)
        //
        __bc_paramNames = _methodParamMap.get(_setHeadersMethod);
        __bc_paramDescriptors = new ParameterDescriptor[__bc_paramNames.length];
        for (int j = 0; j < __bc_paramNames.length; j++)
        {
            __bc_paramDescriptors[j] = new ParameterDescriptor();
            __bc_paramDescriptors[j].setName(__bc_paramNames[j]);
            __bc_paramDescriptors[j].setDisplayName(__bc_paramNames[j]);
        }
        md = new MethodDescriptor(_setHeadersMethod, __bc_paramDescriptors);
        methodDescriptors[index++] = md;
       
       
    }
   
    public MethodDescriptor [] getMethodDescriptors()
    {
        MethodDescriptor [] __bc_methodDescriptors = new MethodDescriptor[7];
        try
        {
            initMethodDescriptors(__bc_methodDescriptors, 0);
        }
        catch (java.beans.IntrospectionException __bc_ie)
        {
            throw new ControlException("Unable to create MethodDescriptor", __bc_ie);
        }
        return __bc_methodDescriptors;
    }
   
    /**
    * Stores PropertyDescriptor descriptors for this bean and its superclasses into
    * an array, starting at the specified index
    */
    protected void initPropertyDescriptors(PropertyDescriptor [] propDescriptors, int index)
    throws java.beans.IntrospectionException
    {
        PropertyDescriptor pd;
       
        pd = new PropertyDescriptor( "controlImplementation" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getControlImplementation", "setControlImplementation");
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "value" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getMessageValue", "setMessageValue");
        pd.setName("value");
        pd.setDisplayName("value");
        pd.setShortDescription( "The message type" );
        pd.setExpert(false);
        pd.setHidden(false);
        pd.setPreferred(false);
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "name" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getPropertyName", "setPropertyName");
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "value" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getPropertyValue", "setPropertyValue");
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "type" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getPropertyType", "setPropertyType");
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "value" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getPriorityValue", "setPriorityValue");
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "value" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getTypeValue", "setTypeValue");
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "value" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getCorrelationIdValue", "setCorrelationIdValue");
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "value" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getExpirationValue", "setExpirationValue");
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "value" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getDeliveryValue", "setDeliveryValue");
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "value" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getPropertiesValue", "setPropertiesValue");
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "sendJndiName" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getSendJndiName", "setSendJndiName");
        pd.setName("sendJndiName");
        pd.setDisplayName("sendJndiName");
        pd.setShortDescription( "JNDI name of the queue or topic" );
        pd.setExpert(false);
        pd.setHidden(false);
        pd.setPreferred(false);
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "sendCorrelationProperty" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getSendCorrelationProperty", "setSendCorrelationProperty");
        pd.setName("sendCorrelationProperty");
        pd.setDisplayName("sendCorrelationProperty");
        pd.setShortDescription( "Correlation-Id for messages" );
        pd.setExpert(false);
        pd.setHidden(false);
        pd.setPreferred(false);
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "jndiConnectionFactory" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getJndiConnectionFactory", "setJndiConnectionFactory");
        pd.setName("jndiConnectionFactory");
        pd.setDisplayName("jndiConnectionFactory");
        pd.setShortDescription( "JNDI name of queue connection factory" );
        pd.setExpert(false);
        pd.setHidden(false);
        pd.setPreferred(false);
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "sendType" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getSendType", "setSendType");
        pd.setName("sendType");
        pd.setDisplayName("sendType");
        pd.setShortDescription( "The destination type (DestinationType). The default is to use the type of the destination object named by the JNDI name" );
        pd.setExpert(false);
        pd.setHidden(false);
        pd.setPreferred(false);
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "transacted" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "isTransacted", "setTransacted");
        pd.setName("transacted");
        pd.setDisplayName("transacted");
        pd.setShortDescription( "True if send is transacted. The default is transacted" );
        pd.setExpert(false);
        pd.setHidden(false);
        pd.setPreferred(false);
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "acknowledgeMode" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getAcknowledgeMode", "setAcknowledgeMode");
        pd.setName("acknowledgeMode");
        pd.setDisplayName("acknowledgeMode");
        pd.setShortDescription( "The acknowledge mode. The default is to use auto-acknowledge" );
        pd.setExpert(false);
        pd.setHidden(false);
        pd.setPreferred(false);
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "jndiContextFactory" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getJndiContextFactory", "setJndiContextFactory");
        pd.setName("jndiContextFactory");
        pd.setDisplayName("jndiContextFactory");
        pd.setShortDescription( "JNDI context factory" );
        pd.setExpert(false);
        pd.setHidden(false);
        pd.setPreferred(false);
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "jndiProviderURL" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getJndiProviderURL", "setJndiProviderURL");
        pd.setName("jndiProviderURL");
        pd.setDisplayName("jndiProviderURL");
        pd.setShortDescription( "JNDI provider URL" );
        pd.setExpert(false);
        pd.setHidden(false);
        pd.setPreferred(false);
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "jndiUsername" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getJndiUsername", "setJndiUsername");
        pd.setName("jndiUsername");
        pd.setDisplayName("jndiUsername");
        pd.setShortDescription( "JNDI security principal" );
        pd.setExpert(false);
        pd.setHidden(false);
        pd.setPreferred(false);
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "jndiPassword" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getJndiPassword", "setJndiPassword");
        pd.setName("jndiPassword");
        pd.setDisplayName("jndiPassword");
        pd.setShortDescription( "JNDI security credentials" );
        pd.setExpert(false);
        pd.setHidden(false);
        pd.setPreferred(false);
        propDescriptors[index++] = pd;
       
        //
        // add property descriptors for any getter/setters defined in control interface
        //
        pd = new PropertyDescriptor( "destination" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getDestination", null);
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "headers" , org.apache.beehive.controls.system.jms.JMSControlBean.class, null, "setHeaders");
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "connection" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getConnection", null);
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "session" , org.apache.beehive.controls.system.jms.JMSControlBean.class, "getSession", null);
        propDescriptors[index++] = pd;
        pd = new PropertyDescriptor( "properties" , org.apache.beehive.controls.system.jms.JMSControlBean.class, null, "setProperties");
        propDescriptors[index++] = pd;
       
    }
   
    // java.beans.BeanInfo.getPropertyDescriptors
    public PropertyDescriptor [] getPropertyDescriptors()
    {
        PropertyDescriptor [] __bc_propDescriptors = new PropertyDescriptor[26];
        try
        {
            initPropertyDescriptors(__bc_propDescriptors, 0);
        }
        catch (java.beans.IntrospectionException __bc_ie)
        {
            throw new ControlException("Unable to create PropertyDescriptor", __bc_ie);
        }
        return __bc_propDescriptors;
    }
   
   
    protected void initEventSetDescriptors(EventSetDescriptor [] eventSetDescriptors, int index)
    throws java.beans.IntrospectionException
    {
       
       
    }
   
    // java.beans.BeanInfo.getEventSetDescriptors
    public EventSetDescriptor [] getEventSetDescriptors()
    {
        EventSetDescriptor [] __bc_eventSetDescriptors = new EventSetDescriptor[0];
        try
        {
            initEventSetDescriptors(__bc_eventSetDescriptors, 0);
        }
        catch (java.beans.IntrospectionException __bc_ie)
        {
            throw new ControlException("Unable to create EventSetDescriptor", __bc_ie);
        }
        return __bc_eventSetDescriptors;
    }
}
TOP

Related Classes of org.apache.beehive.controls.system.jms.JMSControlBeanBeanInfo

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.