001/* 002 * Copyright 2019 Ping Identity Corporation 003 * All Rights Reserved. 004 */ 005/* 006 * Copyright (C) 2019 Ping Identity Corporation 007 * 008 * This program is free software; you can redistribute it and/or modify 009 * it under the terms of the GNU General Public License (GPLv2 only) 010 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only) 011 * as published by the Free Software Foundation. 012 * 013 * This program is distributed in the hope that it will be useful, 014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 016 * GNU General Public License for more details. 017 * 018 * You should have received a copy of the GNU General Public License 019 * along with this program; if not, see <http://www.gnu.org/licenses>. 020 */ 021package com.unboundid.ldap.sdk; 022 023 024 025import com.unboundid.util.ThreadSafety; 026import com.unboundid.util.ThreadSafetyLevel; 027 028 029 030/** 031 * This class provides a default implementation of a {@link NameResolver} that 032 * simply uses the JVM-default name resolution functionality. 033 */ 034@ThreadSafety(level= ThreadSafetyLevel.COMPLETELY_THREADSAFE) 035public final class DefaultNameResolver 036 extends NameResolver 037{ 038 /** 039 * The singleton instance of this default name resolver. 040 */ 041 private static final DefaultNameResolver INSTANCE = new DefaultNameResolver(); 042 043 044 045 /** 046 * Prevents this class from being externally instantiated. 047 */ 048 private DefaultNameResolver() 049 { 050 super(); 051 } 052 053 054 055 /** 056 * Retrieves the singleton instance of this default name resolver. 057 * 058 * @return The singleton instance of this default name resolver. 059 */ 060 public static DefaultNameResolver getInstance() 061 { 062 return INSTANCE; 063 } 064 065 066 067 /** 068 * {@inheritDoc} 069 */ 070 @Override() 071 public void toString(final StringBuilder buffer) 072 { 073 buffer.append("DefaultNameResolver()"); 074 } 075}