001    /*
002     * Copyright 2004 Stephen J. McConnell.
003     * Copyright 2004 Niclas Hedhman.
004     *
005     * Licensed  under the  Apache License,  Version 2.0  (the "License");
006     * you may not use  this file  except in  compliance with the License.
007     * You may obtain a copy of the License at
008     *
009     *   http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed  under the  License is distributed on an "AS IS" BASIS,
013     * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
014     * implied.
015     *
016     * See the License for the specific language governing permissions and
017     * limitations under the License.
018     */
019    
020    package net.dpml.transit.monitor;
021    
022    import java.net.URL;
023    
024    /**
025     * A monitor of a network activity or activities.
026     *
027     * <p>
028     *   The NetworkMonitor must be thread safe.
029     * </p>
030     *
031     * @author <a href="http://www.dpml.net">Digital Product Meta Library</a>
032     * @version 1.0.3
033     * @see Monitor
034     */
035    public interface ConnectionMonitor extends Monitor
036    {
037       /**
038        * Notify the monitor that a connection was opened.
039        * @param url the url on which the open connection was issued
040        */
041        void connectionOpened( URL url );
042    
043       /**
044        * Notify the monitor that a connection was started.
045        * @param url the target connection
046        */
047        void connectStarted( URL url );
048    
049    
050       /**
051        * Notify the monitor that a connection was completed.
052        * @param url the target connection
053        */
054        void connectCompleted( URL url );
055    }