Package httl.spi

Examples of httl.spi.Listener


  /**
   * httl.properties: interceptors=httl.spi.interceptors.ExtendsInterceptor
   */
  @Reqiured
  public void setInterceptors(Interceptor[] interceptors) {
    Listener last = null;
    for (int i = interceptors.length - 1; i >= 0; i--) {
      final Interceptor current = interceptors[i];
      final Listener next = last;
      last = new Listener() {
        public void render(Context context) throws IOException, ParseException {
          if (next == null) {
            Listener listener = (Listener) context.get(LISTENER_KEY);
            if (listener != null) {
              current.render(context, listener);
            }
          } else {
            current.render(context, next);
View Full Code Here


        context.setOut((Writer) out);
      } else {
        throw new IllegalArgumentException("No such Converter to convert the " + out.getClass().getName() + " to OutputStream or Writer.");
      }
      if (interceptor != null) {
        interceptor.render(context, new Listener() {
          public void render(Context context) throws IOException, ParseException {
            _render(context);
          }
        });
      } else {
View Full Code Here

TOP

Related Classes of httl.spi.Listener

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.