class GetAdminConsoleInfoTask implements ClusterTask<GetAdminConsoleInfoTask> {
    private String bindInterface;
    private int adminPort;
    private int adminSecurePort;
    private String adminSecret;


    @Override
    public GetAdminConsoleInfoTask getResult() {
        return this;
    }

    @Override
    public void run() {
        PluginManager pluginManager = XMPPServer.getInstance().getPluginManager();
        AdminConsolePlugin adminConsolePlugin = ((AdminConsolePlugin) pluginManager.getPlugin("admin"));

        bindInterface = adminConsolePlugin.getBindInterface();
        adminPort = adminConsolePlugin.getAdminUnsecurePort();
        adminSecurePort = adminConsolePlugin.getAdminSecurePort();
        adminSecret = AdminConsolePlugin.secret;

        if (bindInterface == null) {
            Enumeration<NetworkInterface> nets = null;
            try {
                nets = NetworkInterface.getNetworkInterfaces();
            } catch (SocketException e) {
                // We failed to discover a valid IP address where the admin console is running
                return;
            }
            for (NetworkInterface netInterface : Collections.list(nets)) {
                boolean found = false;
                Enumeration<InetAddress> addresses = netInterface.getInetAddresses();
                for (InetAddress address : Collections.list(addresses)) {
                    if ("127.0.0.1".equals(address.getHostAddress()) || "0:0:0:0:0:0:0:1".equals(address.getHostAddress())) {
                        continue;
                    }
                    Socket socket = new Socket();
                    InetSocketAddress remoteAddress = new InetSocketAddress(address, adminPort > 0 ? adminPort : adminSecurePort);
                    try {
                        socket.connect(remoteAddress);
                        bindInterface = address.getHostAddress();
                        found = true;
                        break;
                    } catch (IOException e) {
                        // Ignore this address. Let's hope there is more addresses to validate
                    }
                }
                if (found) {
                    break;
                }
            }
        }
    }

    public String getBindInterface() {
        return bindInterface;
    }

    public int getAdminPort() {
        return adminPort;
    }

    public int getAdminSecurePort() {
        return adminSecurePort;
    }

    public String getAdminSecret() {
        return adminSecret;
    }

    @Override
    public void writeExternal(ObjectOutput out) throws IOException {<FILL_FUNCTION_BODY>}

    @Override
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        adminPort = ExternalizableUtil.getInstance().readInt(in);
        adminSecurePort = ExternalizableUtil.getInstance().readInt(in);
        if (ExternalizableUtil.getInstance().readBoolean(in)) {
            bindInterface = ExternalizableUtil.getInstance().readSafeUTF(in);
        }
        adminSecret = ExternalizableUtil.getInstance().readSafeUTF(in);
    }

}

        ExternalizableUtil.getInstance().writeInt(out, adminPort);
        ExternalizableUtil.getInstance().writeInt(out, adminSecurePort);
        ExternalizableUtil.getInstance().writeBoolean(out, bindInterface != null);
        if (bindInterface != null) {
            ExternalizableUtil.getInstance().writeSafeUTF(out, bindInterface);
        }
        ExternalizableUtil.getInstance().writeSafeUTF(out, adminSecret);
    
<no_super_class>