Coverage Report - org.apache.tapestry.describe.ReportStatusHub
 
Classes in this File Line Coverage Branch Coverage Complexity
ReportStatusHub
N/A
N/A
1
 
 1  
 // Copyright 2005 The Apache Software Foundation
 2  
 //
 3  
 // Licensed under the Apache License, Version 2.0 (the "License");
 4  
 // you may not use this file except in compliance with the License.
 5  
 // You may obtain a copy of the License at
 6  
 //
 7  
 //     http://www.apache.org/licenses/LICENSE-2.0
 8  
 //
 9  
 // Unless required by applicable law or agreed to in writing, software
 10  
 // distributed under the License is distributed on an "AS IS" BASIS,
 11  
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12  
 // See the License for the specific language governing permissions and
 13  
 // limitations under the License.
 14  
 
 15  
 package org.apache.tapestry.describe;
 16  
 
 17  
 import org.apache.tapestry.IMarkupWriter;
 18  
 import org.apache.tapestry.event.ReportStatusListener;
 19  
 
 20  
 /**
 21  
  * Service for collecting together status information across the framework;
 22  
  * service implementations implement the
 23  
  * {@link org.apache.tapestry.event.ReportStatusListener} interface and register
 24  
  * themselves as listeners here. When desired, the
 25  
  * {@link #fireReportStatus(IMarkupWriter)} event will invoke the listener
 26  
  * method on each registered object.
 27  
  * 
 28  
  * @author Howard M. Lewis Ship
 29  
  * @since 4.0
 30  
  */
 31  
 public interface ReportStatusHub
 32  
 {
 33  
 
 34  
     /**
 35  
      * Adds the listener; listeners will be invoked in the order in which they
 36  
      * are added. <strong>Note: only service implementation that are singletons
 37  
      * should be report status listeners. Threaded or pooled implementations
 38  
      * should not be added; or should be careful to add and remove themselves
 39  
      * from the hub directly.</strong>
 40  
      * 
 41  
      * @param listener
 42  
      */
 43  
     void addReportStatusListener(ReportStatusListener listener);
 44  
 
 45  
     void removeReportStatusListener(ReportStatusListener listener);
 46  
 
 47  
     /**
 48  
      * Generates an HTML status report by invoking
 49  
      * {@link ReportStatusListener#reportStatus(org.apache.tapestry.event.ReportStatusEvent)} on each
 50  
      * registered listener.
 51  
      * 
 52  
      * @param writer
 53  
      *            a markup writer to send the report to.
 54  
      */
 55  
     void fireReportStatus(IMarkupWriter writer);
 56  
 }