001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2008 Sun Microsystems, Inc. 015 */ 016package org.forgerock.opendj.server.config.client; 017 018 019 020import java.util.Collection; 021import java.util.SortedSet; 022import org.forgerock.opendj.config.ConfigurationClient; 023import org.forgerock.opendj.config.ManagedObjectDefinition; 024import org.forgerock.opendj.config.PropertyException; 025import org.forgerock.opendj.ldap.AddressMask; 026import org.forgerock.opendj.server.config.server.ConnectionHandlerCfg; 027 028 029 030/** 031 * A client-side interface for reading and modifying Connection 032 * Handler settings. 033 * <p> 034 * Connection Handlers are responsible for handling all interaction 035 * with the clients, including accepting the connections, reading 036 * requests, and sending responses. 037 */ 038public interface ConnectionHandlerCfgClient extends ConfigurationClient { 039 040 /** 041 * Get the configuration definition associated with this Connection Handler. 042 * 043 * @return Returns the configuration definition associated with this Connection Handler. 044 */ 045 ManagedObjectDefinition<? extends ConnectionHandlerCfgClient, ? extends ConnectionHandlerCfg> definition(); 046 047 048 049 /** 050 * Gets the "allowed-client" property. 051 * <p> 052 * Specifies a set of host names or address masks that determine the 053 * clients that are allowed to establish connections to this 054 * Connection Handler. 055 * <p> 056 * Valid values include a host name, a fully qualified domain name, 057 * a domain name, an IP address, or a subnetwork with subnetwork 058 * mask. 059 * 060 * @return Returns the values of the "allowed-client" property. 061 */ 062 SortedSet<AddressMask> getAllowedClient(); 063 064 065 066 /** 067 * Sets the "allowed-client" property. 068 * <p> 069 * Specifies a set of host names or address masks that determine the 070 * clients that are allowed to establish connections to this 071 * Connection Handler. 072 * <p> 073 * Valid values include a host name, a fully qualified domain name, 074 * a domain name, an IP address, or a subnetwork with subnetwork 075 * mask. 076 * 077 * @param values The values of the "allowed-client" property. 078 * @throws PropertyException 079 * If one or more of the new values are invalid. 080 */ 081 void setAllowedClient(Collection<AddressMask> values) throws PropertyException; 082 083 084 085 /** 086 * Gets the "denied-client" property. 087 * <p> 088 * Specifies a set of host names or address masks that determine the 089 * clients that are not allowed to establish connections to this 090 * Connection Handler. 091 * <p> 092 * Valid values include a host name, a fully qualified domain name, 093 * a domain name, an IP address, or a subnetwork with subnetwork 094 * mask. If both allowed and denied client masks are defined and a 095 * client connection matches one or more masks in both lists, then 096 * the connection is denied. If only a denied list is specified, then 097 * any client not matching a mask in that list is allowed. 098 * 099 * @return Returns the values of the "denied-client" property. 100 */ 101 SortedSet<AddressMask> getDeniedClient(); 102 103 104 105 /** 106 * Sets the "denied-client" property. 107 * <p> 108 * Specifies a set of host names or address masks that determine the 109 * clients that are not allowed to establish connections to this 110 * Connection Handler. 111 * <p> 112 * Valid values include a host name, a fully qualified domain name, 113 * a domain name, an IP address, or a subnetwork with subnetwork 114 * mask. If both allowed and denied client masks are defined and a 115 * client connection matches one or more masks in both lists, then 116 * the connection is denied. If only a denied list is specified, then 117 * any client not matching a mask in that list is allowed. 118 * 119 * @param values The values of the "denied-client" property. 120 * @throws PropertyException 121 * If one or more of the new values are invalid. 122 */ 123 void setDeniedClient(Collection<AddressMask> values) throws PropertyException; 124 125 126 127 /** 128 * Gets the "enabled" property. 129 * <p> 130 * Indicates whether the Connection Handler is enabled. 131 * 132 * @return Returns the value of the "enabled" property. 133 */ 134 Boolean isEnabled(); 135 136 137 138 /** 139 * Sets the "enabled" property. 140 * <p> 141 * Indicates whether the Connection Handler is enabled. 142 * 143 * @param value The value of the "enabled" property. 144 * @throws PropertyException 145 * If the new value is invalid. 146 */ 147 void setEnabled(boolean value) throws PropertyException; 148 149 150 151 /** 152 * Gets the "java-class" property. 153 * <p> 154 * Specifies the fully-qualified name of the Java class that 155 * provides the Connection Handler implementation. 156 * 157 * @return Returns the value of the "java-class" property. 158 */ 159 String getJavaClass(); 160 161 162 163 /** 164 * Sets the "java-class" property. 165 * <p> 166 * Specifies the fully-qualified name of the Java class that 167 * provides the Connection Handler implementation. 168 * 169 * @param value The value of the "java-class" property. 170 * @throws PropertyException 171 * If the new value is invalid. 172 */ 173 void setJavaClass(String value) throws PropertyException; 174 175}