Exemple #1
0
        public Twitter()
        {
            AdapterModes = new AdapterMode[]
            {
                new AdapterMode("Subscribe", MessageDirection.DatagramSender)
            };

            Capabilities = new ESBAdapterCapabilities()
            {
                AdapterName = "TweetAdapter"
            };
        }
Exemple #2
0
        /// <summary>
        /// Create an initialized instance of the adapter
        /// </summary>
        /// <remarks>
        /// AdapterModes and ESBAdapterCapabilities must always be initialized so that the ESB
        /// framework and Neuron ESB Explorer UI can correctly interact with the adapter. Modes that are supported in the UI must listed.
        /// meta data i.e. esb message custom propeties that will be supported must be added, each one preceeded by a period (.), followed by the
        /// name of the property (no spaces), a semicolon, followed by the description of the property i.e.
        ///     .[NameOfProperty].[Description of property]
        /// These properties will be displayed in the Set Properties Process Step as well.
        /// </remarks>
        public SerialAdapter()
        {
            AdapterModes = new AdapterMode[]
            {
                /// To control what is displayed and supporte in the neuron explorer UI, comment out the modes
                /// that you do not wish to support
                // new AdapterMode(AdapterModeStringsEnum.Subscriber.Description(), MessageDirection.DatagramSender),      // subscribe mode - send messages to an SerialPort
                new AdapterMode(AdapterModeStringsEnum.Publish.Description(), MessageDirection.DatagramReceiver),     // Receive mode - new files are obtained from SerialPort and published to the bus
            };

            ESBAdapterCapabilities caps = new ESBAdapterCapabilities();

            caps.AdapterName = AdapterName;
            caps.Prefix      = MetadataPrefix;


            // SAMPLE: Sample context properties that will be exposed within Neuron. These can be viewed within the Set Properties Process Step
            // **************************************************************
            caps.MetadataFieldInfo =
                MetadataPrefix + ".SerialPort:Name of SerialPort data is sent to or retreived from," +
                MetadataPrefix + ".BaudRate:bits per second,";
            // **************************************************************
            Capabilities = caps;
        }