AbstractConnectionListener.java

  1. /**
  2.  *
  3.  * Copyright 2009 the original author or authors
  4.  *
  5.  * Licensed under the Apache License, Version 2.0 (the "License");
  6.  * you may not use this file except in compliance with the License.
  7.  * You may obtain a copy of the License at
  8.  *
  9.  *     http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.jivesoftware.smack;

  18. /**
  19.  * The AbstractConnectionListener class provides an empty implementation for all
  20.  * methods defined by the {@link ConnectionListener} interface. This is a
  21.  * convenience class which should be used in case you do not need to implement
  22.  * all methods.
  23.  *
  24.  * @author Henning Staib
  25.  */
  26. public class AbstractConnectionListener implements ConnectionListener {
  27.     @Override
  28.     public void connected(XMPPConnection connection) {
  29.         // do nothing
  30.     }

  31.     @Override
  32.     public void authenticated(XMPPConnection connection, boolean resumed) {
  33.         // do nothing
  34.     }

  35.     @Override
  36.     public void connectionClosed() {
  37.         // do nothing
  38.     }

  39.     @Override
  40.     public void connectionClosedOnError(Exception e) {
  41.         // do nothing
  42.     }

  43.     @Override
  44.     public void reconnectingIn(int seconds) {
  45.         // do nothing
  46.     }

  47.     @Override
  48.     public void reconnectionFailed(Exception e) {
  49.         // do nothing
  50.     }

  51.     @Override
  52.     public void reconnectionSuccessful() {
  53.         // do nothing
  54.     }
  55. }