Package org.openquark.samples.bam.model.MessageSourceDescription

Examples of org.openquark.samples.bam.model.MessageSourceDescription.MessagePropertyDescription


     * @return Returns a Collection of MessagePropertyInfos for this message source
     */
    public static Collection<MessagePropertyDescription> getMessagePropertyInfos () {
        List<MessagePropertyDescription> result = new ArrayList<MessagePropertyDescription> ();

        result.add (new MessagePropertyDescription (CUSTOMER_NAME, Message.STRING));
        result.add (new MessagePropertyDescription (SALES_AMOUNT, Message.DOUBLE));

        return result;
    }
View Full Code Here


           
            if (columns.size () > 0) {
                result = new ArrayList<MessagePropertyDescription> ();
               
                for (final ColumnDef columnDef : columns) {
                    result.add (new MessagePropertyDescription (columnDef.name, columnDef.type));
                }
            }
        } finally {
            bufferedReader.close ();
        }
View Full Code Here

     */
    private InputBinding makeBinding (int dataType) {
        InputBinding result = null;

        if (getPropertyRadioButton ().isSelected ()) {
            MessagePropertyDescription propertyInfo = getPropertyCombo ().getSelectedInfo();

            if (propertyInfo != null) {
                result = new PropertyBinding (propertyInfo);
            }
        } else if (metricRadioButton.isSelected()) {
View Full Code Here

        XMLPersistenceHelper.checkTag(bindingElem, getXmlTag());
       
        String propertyName = bindingElem.getAttribute(MonitorSaveConstants.PropertyNameAttr);
        String metricName   = bindingElem.getAttribute(MonitorSaveConstants.MetricNameAttr);
       
        MessagePropertyDescription propertyInfo = lookupProperty (propertyName, messagePropertyDescriptions);
        if (propertyInfo == null) {
            throw new InvalidFileFormat ("Metric binding refers to unknown message property :" + propertyName);
        }
        MetricDescription metricDescription = new MetricDescription(QualifiedName.makeFromCompoundName(metricName), propertyInfo);
View Full Code Here

     */
    public static MetricDescription Load (Element metricDescriptionElem, Collection<MessagePropertyDescription> messagePropertyInfos) {
        String propertyName = metricDescriptionElem.getAttribute(MonitorSaveConstants.PropertyNameAttr);
        String gemName   = metricDescriptionElem.getAttribute(MonitorSaveConstants.MetricNameAttr);
       
        MessagePropertyDescription propertyInfo = lookup(propertyName, messagePropertyInfos);

      
        return new MetricDescription (QualifiedName.makeFromCompoundName(gemName), propertyInfo);
    }
View Full Code Here

    public static PropertyBinding Load (Element bindingElem, Collection<MessagePropertyDescription> messagePropertyInfos) throws BadXMLDocumentException, InvalidFileFormat {
        XMLPersistenceHelper.checkTag(bindingElem, getXmlTag());
       
        String propertyName = bindingElem.getAttribute(MonitorSaveConstants.PropertyNameAttr);
       
        MessagePropertyDescription propertyInfo = lookupProperty (propertyName, messagePropertyInfos);
       
        if (propertyInfo != null) {
            return new PropertyBinding (propertyInfo);
        } else {
            throw new InvalidFileFormat ("Property bindings refers to unknown message property :" + propertyName);
View Full Code Here

    public static MonitorJobDescription makeTestInstance () {
        MessageSourceDescription messageSourceDescription = new TextFileMessageSourceDescription ("Customer Sales", "Resources/testfile.txt");

        MonitorJobDescription result = new MonitorJobDescription (messageSourceDescription);

        MessagePropertyDescription namePropertyInfo = result.messagePropertyDescriptions.get(0);
        MessagePropertyDescription amountPropertyInfo = result.messagePropertyDescriptions.get(1);

        MetricDescription metricDescription = new MetricDescription (
            QualifiedName.make("Cal.Samples.BusinessActivityMonitor.BAM", "average") , amountPropertyInfo);
       
        ArrayList<InputBinding> triggerInputBindings = new ArrayList<InputBinding> ();
View Full Code Here

TOP

Related Classes of org.openquark.samples.bam.model.MessageSourceDescription.MessagePropertyDescription

Copyright © 2018 www.massapicom. 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.