001/* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2013-2014 ForgeRock AS. 025 */ 026package org.forgerock.opendj.ldap.spi; 027 028import java.net.InetSocketAddress; 029 030import org.forgerock.opendj.ldap.ConnectionFactory; 031 032/** 033 * Interface for all classes that actually implement 034 * {@code LDAPConnectionFactory}. 035 * <p> 036 * An implementation class is provided by a {@code TransportProvider}. 037 * <p> 038 * The implementation can be automatically loaded using the 039 * {@code java.util.ServiceLoader} facility if its provider extending 040 * {@code TransportProvider} is declared in the provider-configuration file 041 * {@code META-INF/services/org.forgerock.opendj.ldap.spi.TransportProvider}. 042 */ 043public interface LDAPConnectionFactoryImpl extends ConnectionFactory { 044 045 /** 046 * Returns the address used by the connections created by this factory. 047 * 048 * @return The address used by the connections. 049 */ 050 InetSocketAddress getSocketAddress(); 051 052 /** 053 * Returns the hostname used by the connections created by this factory. 054 * 055 * @return The hostname used by the connections. 056 */ 057 String getHostName(); 058 059 /** 060 * Returns the remote port number used by the connections created by this 061 * factory. 062 * 063 * @return The remote port number used by the connections. 064 */ 065 int getPort(); 066 067}