@Override public void perform(final Rewrite event, final EvaluationContext context) { if (Direction.isOutbound().evaluate(event, context)) location.perform(event, context); }
@Override protected Configuration narrow(ExampleConfiguration appConfiguration) { if (appConfiguration != null && !Collections.isEmpty(appConfiguration.angularjsRoutes) ) { Set<String> paths = new HashSet<>(appConfiguration.angularjsRoutes); return ConfigurationBuilder.begin() .addRule() .when( Direction.isInbound() .and(Path.matches("/{path}")) .and(matchesAnyOfPaths(paths)) ) .perform( Log.message(Logger.Level.DEBUG, "Forwarding to index.html from {path}") .and(Forward.to("/index.html")) ); } return null; }
@Override public void perform(final Rewrite event, final EvaluationContext context) { if (Direction.isOutbound().evaluate(event, context)) location.perform(event, context); }
@Override public void perform(final Rewrite event, final EvaluationContext context) { if (Direction.isOutbound().evaluate(event, context)) location.perform(event, context); }
@Override public boolean evaluate(final Rewrite event, final EvaluationContext context) { if (Direction.isOutbound().evaluate(event, context)) return resource.evaluate(event, context); return false; }
@Override public boolean evaluate(final Rewrite event, final EvaluationContext context) { if (Direction.isOutbound().evaluate(event, context)) return resource.evaluate(event, context); return false; }
@Override public boolean evaluate(final Rewrite event, final EvaluationContext context) { if (Direction.isOutbound().evaluate(event, context)) return resource.evaluate(event, context); return false; }