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