Home | History | Annotate | Download | only in net
      1 /*
      2  * Copyright (C) 2011 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.server.net;
     18 
     19 import android.net.INetworkManagementEventObserver;
     20 import android.net.LinkAddress;
     21 import android.net.RouteInfo;
     22 
     23 /**
     24  * Base {@link INetworkManagementEventObserver} that provides no-op
     25  * implementations which can be overridden.
     26  *
     27  * @hide
     28  */
     29 public class BaseNetworkObserver extends INetworkManagementEventObserver.Stub {
     30     @Override
     31     public void interfaceStatusChanged(String iface, boolean up) {
     32         // default no-op
     33     }
     34 
     35     @Override
     36     public void interfaceRemoved(String iface) {
     37         // default no-op
     38     }
     39 
     40     @Override
     41     public void addressUpdated(String iface, LinkAddress address) {
     42         // default no-op
     43     }
     44 
     45     @Override
     46     public void addressRemoved(String iface, LinkAddress address) {
     47         // default no-op
     48     }
     49 
     50     @Override
     51     public void interfaceLinkStateChanged(String iface, boolean up) {
     52         // default no-op
     53     }
     54 
     55     @Override
     56     public void interfaceAdded(String iface) {
     57         // default no-op
     58     }
     59 
     60     @Override
     61     public void interfaceClassDataActivityChanged(String label, boolean active, long tsNanos) {
     62         // default no-op
     63     }
     64 
     65     @Override
     66     public void limitReached(String limitName, String iface) {
     67         // default no-op
     68     }
     69 
     70     @Override
     71     public void interfaceDnsServerInfo(String iface, long lifetime, String[] servers) {
     72         // default no-op
     73     }
     74 
     75     @Override
     76     public void routeUpdated(RouteInfo route) {
     77         // default no-op
     78     }
     79 
     80     @Override
     81     public void routeRemoved(RouteInfo route) {
     82         // default no-op
     83     }
     84 }
     85