Examples of FilterException


Examples of com.dbxml.labrador.exceptions.FilterException

   public Filter getFilter(int index) throws FilterException {
      synchronized ( filterMutex ) {
         if ( index >= 0 && index < filters.length )
            return filters[index];
      }
      throw new FilterException("Filter not found at index '"+index+"'");
   }
View Full Code Here

Examples of com.dbxml.labrador.exceptions.FilterException

                  System.arraycopy(filters, i + 1, newFilters, i, newFilters.length - i);
               filters = newFilters;
               return filter;
            }
      }
      throw new FilterException("Could not remove Filter");
   }
View Full Code Here

Examples of com.ecyrd.jspwiki.filters.FilterException

     */
    public static class AbortFilter extends BasicPageFilter
    {
        public String preSave(WikiContext wikiContext, String content) throws FilterException
        {
            throw new FilterException( "Page save aborted." );
        }
View Full Code Here

Examples of com.ning.http.client.filter.FilterException

        try {
            if (logger.isDebugEnabled()) {
                logger.debug("Current Throttling Status {}", available.availablePermits());
            }
            if (!available.tryAcquire(maxWait, TimeUnit.MILLISECONDS)) {
                throw new FilterException(
                        String.format("No slot available for processing Request %s with AsyncHandler %s",
                                ctx.getRequest(), ctx.getAsyncHandler()));
            }
            ;
        } catch (InterruptedException e) {
            throw new FilterException(
                    String.format("Interrupted Request %s with AsyncHandler %s", ctx.getRequest(), ctx.getAsyncHandler()));
        }

        return new FilterContext.FilterContextBuilder(ctx).asyncHandler(new AsyncHandlerWrapper(ctx.getAsyncHandler())).build();
    }
View Full Code Here

Examples of eu.bitfish.jcf.processor.exception.FilterException

    try {
      Class<?> clazz = obj.getClass();
      Method meth = clazz.getMethod(method, new Class[] {});
      return meth.invoke(obj, new Object[] {});
    } catch (NoSuchMethodException e) {
      throw new FilterException("Method " + method + " does not exist.",
          e);
    } catch (SecurityException e) {
      throw new FilterException("Method " + method
          + " is not accessible.", e);
    } catch (IllegalAccessException | IllegalArgumentException
        | InvocationTargetException e) {
      throw new FilterException("Unable to execute the method " + method
          + " on object " + obj, e);
    }
  }
View Full Code Here

Examples of eu.bitfish.jcf.processor.exception.FilterException

          && DateUtil.isDate(secondValue)) {
        try {
          return DateUtil.getDate(firstValue).compareTo(
              DateUtil.getDate(secondValue)) == 1;
        } catch (ParseException e) {
          throw new FilterException("Unable to parse date ("
              + firstValue + ", " + secondValue + ")");
        }
      }
      throw new FilterException("Operator > for value " + firstValue
          + " and value " + secondValue + " is not applicable.");
    case ">=":
      if (StringUtils.isNumeric(firstValue)
          && StringUtils.isNumeric(secondValue)) {
        return Double.parseDouble(firstValue) > Double
            .parseDouble(secondValue);
      } else if (DateUtil.isDate(firstValue)
          && DateUtil.isDate(secondValue)) {
        try {
          return DateUtil.getDate(firstValue).compareTo(
              DateUtil.getDate(secondValue)) >= 0;
        } catch (ParseException e) {
          throw new FilterException("Unable to parse date ("
              + firstValue + ", " + secondValue + ")");
        }
      }
      throw new FilterException("Operator >= for value " + firstValue
          + " and value " + secondValue + " is not applicable.");
    case "<":
      if (StringUtils.isNumeric(firstValue)
          && StringUtils.isNumeric(secondValue)) {
        return Double.parseDouble(firstValue) < Double
            .parseDouble(secondValue);
      } else if (DateUtil.isDate(firstValue)
          && DateUtil.isDate(secondValue)) {
        try {
          return DateUtil.getDate(firstValue).compareTo(
              DateUtil.getDate(secondValue)) == -1;
        } catch (ParseException e) {
          throw new FilterException("Unable to parse date ("
              + firstValue + ", " + secondValue + ")");
        }
      }
      throw new FilterException("Operator < for value " + firstValue
          + " and value " + secondValue + " is not applicable.");
    case "<=":
      if (StringUtils.isNumeric(firstValue)
          && StringUtils.isNumeric(secondValue)) {
        return Double.parseDouble(firstValue) < Double
            .parseDouble(secondValue);
      } else if (DateUtil.isDate(firstValue)
          && DateUtil.isDate(secondValue)) {
        try {
          return DateUtil.getDate(firstValue).compareTo(
              DateUtil.getDate(secondValue)) <= 0;
        } catch (ParseException e) {
          throw new FilterException("Unable to parse date ("
              + firstValue + ", " + secondValue + ")");
        }
      }
      throw new FilterException("Operator <= for value " + firstValue
          + " and value " + secondValue + " is not applicable.");
    }

    throw new FilterException("Unkown operator " + _operator);
  }
View Full Code Here

Examples of hu.sztaki.ilab.longneck.process.FilterException

*/
public class Filter extends AbstractSourceInfoContainer implements Block {

    @Override
    public void apply(Record record, VariableSpace parentScope) throws FilterException {
        throw new FilterException("Record was filtered out.");
    }
View Full Code Here

Examples of org.apache.activemq.apollo.filter.FilterException

                            return type.cast(new Buffer(data));
                        }
                    }
                    return null;
                } catch (OpenwireException e) {
                    throw new FilterException(e);
                }
            }

            public Object getProperty(String name) {
                Expression expression = JMS_PROPERTY_EXPRESSIONS.get(name);
View Full Code Here

Examples of org.apache.activemq.apollo.filter.FilterException

                            return type.cast(new Buffer(data));
                        }
                    }
                    return null;
                } catch (OpenwireException e) {
                    throw new FilterException(e);
                }
            }

            public Object getProperty(String name) {
                Expression expression = JMS_PROPERTY_EXPRESSIONS.get(name);
View Full Code Here

Examples of org.apache.activemq.apollo.filter.FilterException

                            return type.cast(new Buffer(data));
                        }
                    }
                    return null;
                } catch (OpenwireException e) {
                    throw new FilterException(e);
                }
            }

            public Object getProperty(String name) {
                Expression expression = JMS_PROPERTY_EXPRESSIONS.get(name);
View Full Code Here
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.