001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one
003     * or more contributor license agreements. See the NOTICE file
004     * distributed with this work for additional information
005     * regarding copyright ownership. The ASF licenses this file
006     * to you under the Apache License, Version 2.0 (the  "License");
007     * you may not use this file except in compliance with the License.
008     * You may obtain a copy of the License at
009     *
010     *     http://www.apache.org/licenses/LICENSE-2.0
011     *
012     * Unless required by applicable law or agreed to in writing, software
013     * distributed under the License is distributed on an "AS IS" BASIS,
014     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015     * See the License for the specific language governing permissions and
016     * limitations under the License.
017     */
018    /*
019     * $Id: TraceListener.java 468644 2006-10-28 06:56:42Z minchau $
020     */
021    package org.apache.xalan.trace;
022    
023    
024    /**
025     * Interface the XSL processor calls when it matches a source node, selects a set of source nodes,
026     * or generates a result node.
027     * If you want an object instance to be called when a trace event occurs, use the TransformerImpl setTraceListener method.
028     * @see org.apache.xalan.trace.TracerEvent
029     * @see org.apache.xalan.trace.TraceManager#addTraceListener
030     * @xsl.usage advanced
031     */
032    public interface TraceListener extends java.util.EventListener
033    {
034    
035      /**
036       * Method that is called when a trace event occurs.
037       * The method is blocking.  It must return before processing continues.
038       *
039       * @param ev the trace event.
040       */
041      public void trace(TracerEvent ev);
042    
043      /**
044       * Method that is called just after the formatter listener is called.
045       *
046       * @param ev the generate event.
047       *
048       * @throws javax.xml.transform.TransformerException
049       */
050      public void selected(SelectionEvent ev) throws javax.xml.transform.TransformerException;
051    
052      /**
053       * Method that is called just after the formatter listener is called.
054       *
055       * @param ev the generate event.
056       */
057      public void generated(GenerateEvent ev);
058    }