001    /**
002     * Copyright 2007 Mike Kroutikov.
003     *
004     * This program is free software; you can redistribute it and/or modify
005     *   it under the terms of the Lesser GNU General Public License as 
006     *   published by the Free Software Foundation; either version 3 of
007     *   the License, or (at your option) any later version.
008     *
009     *   This program is distributed in the hope that it will be useful,
010     *   but WITHOUT ANY WARRANTY; without even the implied warranty of
011     *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
012     *   Lesser GNU General Public License for more details.
013     *
014     *   You should have received a copy of the Lesser GNU General Public License
015     *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
016     */
017    
018    package org.otfeed.support;
019    
020    import org.otfeed.event.IConnectionStateListener;
021    import org.otfeed.event.OTError;
022    import org.otfeed.event.OTHost;
023    
024    /**
025     * A no-op implementation of
026     * {@link IConnectionStateListener}.
027     * Useful if one needs to override just one or two methods, and is 
028     * not interested in monitoring other connection state changes.
029     */
030    public class ConnectionStateListener implements IConnectionStateListener {
031    
032            public void onConnecting(OTHost addr) { }
033    
034            public void onConnected() { }
035    
036            public void onRedirect(OTHost addr) { }
037    
038            public void onLogin() { }
039    
040            public void onError(OTError error) { }
041    }