All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.openservices.ons.api.MessageSelector Maven / Gradle / Ivy

There is a newer version: 2.0.7.Final
Show newest version
package com.aliyun.openservices.ons.api;

/**
 * 消息选择器
 */
public class MessageSelector {

    private ExpressionType type;
    /**
     * 表达式
     */
    private String subExpression;

    private MessageSelector() {
    }

    private MessageSelector(ExpressionType type, String subExpression) {
        this.type = type;
        this.subExpression = subExpression;
    }

    public static MessageSelector bySql(String subExpression) {
        return new MessageSelector(ExpressionType.SQL92, subExpression);
    }

    public static MessageSelector byTag(String subExpression) {
        return new MessageSelector(ExpressionType.TAG, subExpression);
    }


    public ExpressionType getType() {
        return type;
    }

    public String getSubExpression() {
        return subExpression;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy