text: 
  // Copyright 2014 The Chromium Authors. All rights reserved.
  // Use of this source code is governed by a BSD-style license that can be
  // found in the LICENSE file.
  
  // This file is autogenerated by:
  //     mojo/public/tools/bindings/mojom_bindings_generator.py
  // For:
  //     services/network/public/mojom/host_resolver.mojom
  //
  
  package org.chromium.network.mojom;
  
  import org.chromium.mojo.bindings.DeserializationException;
  
  
  class DnsConfigChangeManagerClient_Internal {
  
      public static final org.chromium.mojo.bindings.Interface.Manager<DnsConfigChangeManagerClient, DnsConfigChangeManagerClient.Proxy> MANAGER =
              new org.chromium.mojo.bindings.Interface.Manager<DnsConfigChangeManagerClient, DnsConfigChangeManagerClient.Proxy>() {
  
          @Override
          public String getName() {
              return "network.mojom.DnsConfigChangeManagerClient";
          }
  
          @Override
          public int getVersion() {
            return 0;
          }
  
          @Override
          public Proxy buildProxy(org.chromium.mojo.system.Core core,
                                  org.chromium.mojo.bindings.MessageReceiverWithResponder messageReceiver) {
              return new Proxy(core, messageReceiver);
          }
  
          @Override
          public Stub buildStub(org.chromium.mojo.system.Core core, DnsConfigChangeManagerClient impl) {
              return new Stub(core, impl);
          }
  
          @Override
          public DnsConfigChangeManagerClient[] buildArray(int size) {
            return new DnsConfigChangeManagerClient[size];
          }
      };
  
  
      private static final int ON_SYSTEM_DNS_CONFIG_CHANGED_ORDINAL = 0;
  
  
      static final class Proxy extends org.chromium.mojo.bindings.Interface.AbstractProxy implements DnsConfigChangeManagerClient.Proxy {
  
          Proxy(org.chromium.mojo.system.Core core,
                org.chromium.mojo.bindings.MessageReceiverWithResponder messageReceiver) {
              super(core, messageReceiver);
          }
  
  
          @Override
          public void onSystemDnsConfigChanged(
  ) {
  
              DnsConfigChangeManagerClientOnSystemDnsConfigChangedParams _message = new DnsConfigChangeManagerClientOnSystemDnsConfigChangedParams();
  
  
              getProxyHandler().getMessageReceiver().accept(
                      _message.serializeWithHeader(
                              getProxyHandler().getCore(),
                              new org.chromium.mojo.bindings.MessageHeader(ON_SYSTEM_DNS_CONFIG_CHANGED_ORDINAL)));
  
          }
  
  
      }
  
      static final class Stub extends org.chromium.mojo.bindings.Interface.Stub<DnsConfigChangeManagerClient> {
  
          Stub(org.chromium.mojo.system.Core core, DnsConfigChangeManagerClient impl) {
              super(core, impl);
          }
  
          @Override
          public boolean accept(org.chromium.mojo.bindings.Message message) {
              try {
                  org.chromium.mojo.bindings.ServiceMessage messageWithHeader =
                          message.asServiceMessage();
                  org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeader();
                  if (!header.validateHeader(org.chromium.mojo.bindings.MessageHeader.NO_FLAG)) {
                      return false;
                  }
                  switch(header.getType()) {
  
                      case org.chromium.mojo.bindings.interfacecontrol.InterfaceControlMessagesConstants.RUN_OR_CLOSE_PIPE_MESSAGE_ID:
                          return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.handleRunOrClosePipe(
                                  DnsConfigChangeManagerClient_Internal.MANAGER, messageWithHeader);
  
  
  
  
  
                      case ON_SYSTEM_DNS_CONFIG_CHANGED_ORDINAL: {
  
                          DnsConfigChangeManagerClientOnSystemDnsConfigChangedParams.deserialize(messageWithHeader.getPayload());
  
                          getImpl().onSystemDnsConfigChanged();
                          return true;
                      }
  
  
                      default:
                          return false;
                  }
              } catch (org.chromium.mojo.bindings.DeserializationException e) {
                  System.err.println(e.toString());
                  return false;
              }
          }
  
          @Override
          public boolean acceptWithResponder(org.chromium.mojo.bindings.Message message, org.chromium.mojo.bindings.MessageReceiver receiver) {
              try {
                  org.chromium.mojo.bindings.ServiceMessage messageWithHeader =
                          message.asServiceMessage();
                  org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeader();
                  if (!header.validateHeader(org.chromium.mojo.bindings.MessageHeader.MESSAGE_EXPECTS_RESPONSE_FLAG)) {
                      return false;
                  }
                  switch(header.getType()) {
  
                      case org.chromium.mojo.bindings.interfacecontrol.InterfaceControlMessagesConstants.RUN_MESSAGE_ID:
                          return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.handleRun(
                                  getCore(), DnsConfigChangeManagerClient_Internal.MANAGER, messageWithHeader, receiver);
  
  
  
  
                      default:
                          return false;
                  }
              } catch (org.chromium.mojo.bindings.DeserializationException e) {
                  System.err.println(e.toString());
                  return false;
              }
          }
      }
  
  
      
      static final class DnsConfigChangeManagerClientOnSystemDnsConfigChangedParams extends org.chromium.mojo.bindings.Struct {
  
          private static final int STRUCT_SIZE = 8;
          private static final org.chromium.mojo.bindings.DataHeader[] VERSION_ARRAY = new org.chromium.mojo.bindings.DataHeader[] {new org.chromium.mojo.bindings.DataHeader(8, 0)};
          private static final org.chromium.mojo.bindings.DataHeader DEFAULT_STRUCT_INFO = VERSION_ARRAY[0];
  
          private DnsConfigChangeManagerClientOnSystemDnsConfigChangedParams(int version) {
              super(STRUCT_SIZE, version);
          }
  
          public DnsConfigChangeManagerClientOnSystemDnsConfigChangedParams() {
              this(0);
          }
  
          public static DnsConfigChangeManagerClientOnSystemDnsConfigChangedParams deserialize(org.chromium.mojo.bindings.Message message) {
              return decode(new org.chromium.mojo.bindings.Decoder(message));
          }
  
          /**
           * Similar to the method above, but deserializes from a |ByteBuffer| instance.
           *
           * @throws org.chromium.mojo.bindings.DeserializationException on deserialization failure.
           */
          public static DnsConfigChangeManagerClientOnSystemDnsConfigChangedParams deserialize(java.nio.ByteBuffer data) {
              return deserialize(new org.chromium.mojo.bindings.Message(
                      data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));
          }
  
          @SuppressWarnings("unchecked")
          public static DnsConfigChangeManagerClientOnSystemDnsConfigChangedParams decode(org.chromium.mojo.bindings.Decoder decoder0) {
              if (decoder0 == null) {
                  return null;
              }
              decoder0.increaseStackDepth();
              DnsConfigChangeManagerClientOnSystemDnsConfigChangedParams result;
              try {
                  org.chromium.mojo.bindings.DataHeader mainDataHeader = decoder0.readAndValidateDataHeader(VERSION_ARRAY);
                  final int elementsOrVersion = mainDataHeader.elementsOrVersion;
                  result = new DnsConfigChangeManagerClientOnSystemDnsConfigChangedParams(elementsOrVersion);
  
              } finally {
                  decoder0.decreaseStackDepth();
              }
              return result;
          }
  
          @SuppressWarnings("unchecked")
          @Override
          protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
              encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
          }
      }
  
  
  
  }
  