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 2008 Sun Microsystems, Inc. 025 */ 026package org.opends.server.admin.std.client; 027 028 029 030import java.util.Collection; 031import java.util.SortedSet; 032import org.forgerock.opendj.ldap.AddressMask; 033import org.opends.server.admin.ConfigurationClient; 034import org.opends.server.admin.ManagedObjectDefinition; 035import org.opends.server.admin.PropertyException; 036import org.opends.server.admin.std.server.ConnectionHandlerCfg; 037 038 039 040/** 041 * A client-side interface for reading and modifying Connection 042 * Handler settings. 043 * <p> 044 * Connection Handlers are responsible for handling all interaction 045 * with the clients, including accepting the connections, reading 046 * requests, and sending responses. 047 */ 048public interface ConnectionHandlerCfgClient extends ConfigurationClient { 049 050 /** 051 * Get the configuration definition associated with this Connection Handler. 052 * 053 * @return Returns the configuration definition associated with this Connection Handler. 054 */ 055 ManagedObjectDefinition<? extends ConnectionHandlerCfgClient, ? extends ConnectionHandlerCfg> definition(); 056 057 058 059 /** 060 * Gets the "allowed-client" property. 061 * <p> 062 * Specifies a set of host names or address masks that determine the 063 * clients that are allowed to establish connections to this 064 * Connection Handler. 065 * <p> 066 * Valid values include a host name, a fully qualified domain name, 067 * a domain name, an IP address, or a subnetwork with subnetwork 068 * mask. 069 * 070 * @return Returns the values of the "allowed-client" property. 071 */ 072 SortedSet<AddressMask> getAllowedClient(); 073 074 075 076 /** 077 * Sets the "allowed-client" property. 078 * <p> 079 * Specifies a set of host names or address masks that determine the 080 * clients that are allowed to establish connections to this 081 * Connection Handler. 082 * <p> 083 * Valid values include a host name, a fully qualified domain name, 084 * a domain name, an IP address, or a subnetwork with subnetwork 085 * mask. 086 * 087 * @param values The values of the "allowed-client" property. 088 * @throws PropertyException 089 * If one or more of the new values are invalid. 090 */ 091 void setAllowedClient(Collection<AddressMask> values) throws PropertyException; 092 093 094 095 /** 096 * Gets the "denied-client" property. 097 * <p> 098 * Specifies a set of host names or address masks that determine the 099 * clients that are not allowed to establish connections to this 100 * Connection Handler. 101 * <p> 102 * Valid values include a host name, a fully qualified domain name, 103 * a domain name, an IP address, or a subnetwork with subnetwork 104 * mask. If both allowed and denied client masks are defined and a 105 * client connection matches one or more masks in both lists, then 106 * the connection is denied. If only a denied list is specified, then 107 * any client not matching a mask in that list is allowed. 108 * 109 * @return Returns the values of the "denied-client" property. 110 */ 111 SortedSet<AddressMask> getDeniedClient(); 112 113 114 115 /** 116 * Sets the "denied-client" property. 117 * <p> 118 * Specifies a set of host names or address masks that determine the 119 * clients that are not allowed to establish connections to this 120 * Connection Handler. 121 * <p> 122 * Valid values include a host name, a fully qualified domain name, 123 * a domain name, an IP address, or a subnetwork with subnetwork 124 * mask. If both allowed and denied client masks are defined and a 125 * client connection matches one or more masks in both lists, then 126 * the connection is denied. If only a denied list is specified, then 127 * any client not matching a mask in that list is allowed. 128 * 129 * @param values The values of the "denied-client" property. 130 * @throws PropertyException 131 * If one or more of the new values are invalid. 132 */ 133 void setDeniedClient(Collection<AddressMask> values) throws PropertyException; 134 135 136 137 /** 138 * Gets the "enabled" property. 139 * <p> 140 * Indicates whether the Connection Handler is enabled. 141 * 142 * @return Returns the value of the "enabled" property. 143 */ 144 Boolean isEnabled(); 145 146 147 148 /** 149 * Sets the "enabled" property. 150 * <p> 151 * Indicates whether the Connection Handler is enabled. 152 * 153 * @param value The value of the "enabled" property. 154 * @throws PropertyException 155 * If the new value is invalid. 156 */ 157 void setEnabled(boolean value) throws PropertyException; 158 159 160 161 /** 162 * Gets the "java-class" property. 163 * <p> 164 * Specifies the fully-qualified name of the Java class that 165 * provides the Connection Handler implementation. 166 * 167 * @return Returns the value of the "java-class" property. 168 */ 169 String getJavaClass(); 170 171 172 173 /** 174 * Sets the "java-class" property. 175 * <p> 176 * Specifies the fully-qualified name of the Java class that 177 * provides the Connection Handler implementation. 178 * 179 * @param value The value of the "java-class" property. 180 * @throws PropertyException 181 * If the new value is invalid. 182 */ 183 void setJavaClass(String value) throws PropertyException; 184 185}