Tabnine Logo
org.apache.activemq.filter
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.activemq.filter

Best Java code snippets using org.apache.activemq.filter (Showing top 20 results out of 315)

origin: apache/activemq

public Object evaluate(MessageEvaluationContext message) throws JMSException {
  Object lvalue = left.evaluate(message);
  if (lvalue == null) {
    return null;
  }
  Object rvalue = right.evaluate(message);
  if (rvalue == null) {
    return null;
  }
  return evaluate(lvalue, rvalue);
}
origin: apache/activemq

@SuppressWarnings({ "rawtypes", "unchecked" })
public Object evaluate(MessageEvaluationContext message) throws JMSException {
  Comparable<Comparable> lv = (Comparable)left.evaluate(message);
  if (lv == null) {
    return null;
  }
  Comparable rv = (Comparable)right.evaluate(message);
  if (rv == null) {
    return null;
  }
  return compare(lv, rv);
}
origin: apache/activemq

public static BooleanExpression createNotLike(Expression left, String right, String escape) {
  return UnaryExpression.createNOT(createLike(left, right, escape));
}
origin: apache/activemq

public static BooleanExpression createBetween(Expression value, Expression left, Expression right) {
  return LogicExpression.createAND(createGreaterThanEqual(value, left), createLessThanEqual(value, right));
}
origin: apache/activemq

public static BooleanExpression createNotBetween(Expression value, Expression left, Expression right) {
  return LogicExpression.createOR(createLessThan(value, left), createGreaterThan(value, right));
}
origin: apache/activemq

public static BooleanExpression createEqual(Expression left, Expression right) {
  checkEqualOperand(left);
  checkEqualOperand(right);
  checkEqualOperandCompatability(left, right);
  return doCreateEqual(left, right);
}
origin: apache/activemq

public static BooleanExpression createNotEqual(Expression left, Expression right) {
  return UnaryExpression.createNOT(createEqual(left, right));
}
origin: apache/activemq

public static BooleanExpression createLessThan(final Expression left, final Expression right) {
  checkLessThanOperand(left);
  checkLessThanOperand(right);
  return new ComparisonExpression(left, right) {
    protected boolean asBoolean(int answer) {
      return answer < 0;
    }
    public String getExpressionSymbol() {
      return "<";
    }
  };
}
origin: apache/activemq

/**
 * @see org.apache.activemq.filter.Expression#evaluate(MessageEvaluationContext)
 */
public Object evaluate(MessageEvaluationContext message) throws JMSException {
  if (view == cview) {
    return cachedValue;
  }
  cachedValue = right.evaluate(message);
  cview = view;
  return cachedValue;
}
origin: apache/activemq

  public boolean matches(MessageEvaluationContext message) throws JMSException {
    Object object = evaluate(message);
    return object != null && object == Boolean.TRUE;
  }
}
origin: apache/activemq

/**
 * Removes the value from the associated destination
 */
public void remove(ActiveMQDestination key, Object value) {
  synchronized (this) {
    unsynchronizedRemove(key, value);
  }
}
origin: apache/activemq

  public boolean matches(MessageEvaluationContext message) throws JMSException {
    Object object = evaluate(message);
    return object != null && object == Boolean.TRUE;
  }
}
origin: apache/activemq

/**
 * @param message
 * @return true if the expression evaluates to Boolean.TRUE.
 * @throws JMSException
 */
public boolean matches(MessageEvaluationContext message) throws JMSException {
  Object object = evaluate(message);
  return object != null && object == Boolean.TRUE;
}
origin: apache/activemq

/**
 * Factory method to create a child node
 */
protected DestinationMapNode createChildNode() {
  return new DestinationMapNode(this);
}
origin: apache/activemq

/**
 * Check whether the given expression is valid for this function.
 *
 * @param    expr - the expression consisting of a call to this function.
 * @return true - if three arguments are passed to the function; false - otherwise.
 */
public boolean isValid(FunctionCallExpression expr) {
  if (expr.getNumArguments() == 3)
    return true;
  return false;
}
origin: apache/activemq

public static BooleanExpression createGreaterThanEqual(final Expression left, final Expression right) {
  checkLessThanOperand(left);
  checkLessThanOperand(right);
  return new ComparisonExpression(left, right) {
    protected boolean asBoolean(int answer) {
      return answer >= 0;
    }
    public String getExpressionSymbol() {
      return ">=";
    }
  };
}
origin: apache/activemq

public Object evaluate(MessageEvaluationContext message) throws JMSException {
  Object rvalue = right.evaluate(message);
  if (rvalue == null) {
    return null;
  }
  if (rvalue instanceof Number) {
    return negate((Number)rvalue);
  }
  return null;
}
origin: apache/activemq

/**
 * Check whether the given expression is a valid call of this function.  Two arguments are required.  Note that
 * the evaluated results of the arguments will be compared with Object#equals().
 *
 * @param    expr - the expression consisting of a call to this function.
 * @return true - if the expression is valid; false - otherwise.
 */
public boolean isValid(FunctionCallExpression expr) {
  if (expr.getNumArguments() != 2)
    return false;
  return true;
}
origin: apache/activemq

public static BooleanExpression createLessThanEqual(final Expression left, final Expression right) {
  checkLessThanOperand(left);
  checkLessThanOperand(right);
  return new ComparisonExpression(left, right) {
    protected boolean asBoolean(int answer) {
      return answer <= 0;
    }
    public String getExpressionSymbol() {
      return "<=";
    }
  };
}
origin: apache/activemq

/**
 * Check whether the given expression is valid for this function.
 *
 * @param    expr - the expression consisting of a call to this function.
 * @return true - if two or three arguments are passed to the function; false - otherwise.
 */
public boolean isValid(FunctionCallExpression expr) {
  if ((expr.getNumArguments() >= 2) && (expr.getNumArguments() <= 3))
    return true;
  return false;
}
org.apache.activemq.filter

Most used classes

  • MessageEvaluationContext
    MessageEvaluationContext is used to cache selection results. A message usually has multiple selector
  • DestinationMap
    A Map-like data structure allowing values to be indexed by ActiveMQDestination and retrieved by dest
  • BooleanExpression
    A BooleanExpression is an expression that always produces a Boolean result.
  • DestinationFilter
    Represents a filter which only operates on Destinations
  • DestinationPath
    Helper class for decomposing a Destination into a number of paths
  • DestinationMapEntry,
  • DestinationMapNode,
  • LogicExpression,
  • NoLocalExpression,
  • NonCachedMessageEvaluationContext,
  • AnyChildDestinationNode,
  • AnyDestination,
  • ArithmeticExpression$1,
  • ArithmeticExpression$2,
  • ArithmeticExpression$3,
  • ArithmeticExpression$4,
  • ArithmeticExpression$5,
  • BinaryExpression,
  • ComparisonExpression$1
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now