001/* 002 * Copyright 2018-2024 Ping Identity Corporation 003 * All Rights Reserved. 004 */ 005/* 006 * Copyright 2018-2024 Ping Identity Corporation 007 * 008 * Licensed under the Apache License, Version 2.0 (the "License"); 009 * you may not use this file except in compliance with the License. 010 * You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, software 015 * distributed under the License is distributed on an "AS IS" BASIS, 016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 017 * See the License for the specific language governing permissions and 018 * limitations under the License. 019 */ 020/* 021 * Copyright (C) 2018-2024 Ping Identity Corporation 022 * 023 * This program is free software; you can redistribute it and/or modify 024 * it under the terms of the GNU General Public License (GPLv2 only) 025 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only) 026 * as published by the Free Software Foundation. 027 * 028 * This program is distributed in the hope that it will be useful, 029 * but WITHOUT ANY WARRANTY; without even the implied warranty of 030 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 031 * GNU General Public License for more details. 032 * 033 * You should have received a copy of the GNU General Public License 034 * along with this program; if not, see <http://www.gnu.org/licenses>. 035 */ 036package com.unboundid.ldap.sdk.unboundidds.tasks; 037 038 039 040import java.util.Collections; 041import java.util.Date; 042import java.util.List; 043import java.util.Map; 044 045import com.unboundid.ldap.sdk.Entry; 046import com.unboundid.util.NotMutable; 047import com.unboundid.util.NotNull; 048import com.unboundid.util.Nullable; 049import com.unboundid.util.ThreadSafety; 050import com.unboundid.util.ThreadSafetyLevel; 051 052import static com.unboundid.ldap.sdk.unboundidds.tasks.TaskMessages.*; 053 054 055 056/** 057 * This class defines a Directory Server task that can be used to request that 058 * the server should dynamically reload all key and trust manager providers 059 * associated with all HTTP connection handlers configured with support for 060 * HTTPS. Note that this may cause problems with a client's ability to resume a 061 * TLS session that was created before the reload. 062 * <BR> 063 * <BLOCKQUOTE> 064 * <B>NOTE:</B> This class, and other classes within the 065 * {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only 066 * supported for use against Ping Identity, UnboundID, and 067 * Nokia/Alcatel-Lucent 8661 server products. These classes provide support 068 * for proprietary functionality or for external specifications that are not 069 * considered stable or mature enough to be guaranteed to work in an 070 * interoperable way with other types of LDAP servers. 071 * </BLOCKQUOTE> 072 * <BR> 073 * The reload HTTP connection handler certificates task does not have any 074 * task-specific properties. 075 */ 076@NotMutable() 077@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE) 078public final class ReloadHTTPConnectionHandlerCertificatesTask 079 extends Task 080{ 081 /** 082 * The fully-qualified name of the Java class in the server that is used for 083 * the reload HTTP connection handler certificates task. 084 */ 085 @NotNull static final String 086 RELOAD_HTTP_CONNECTION_HANDLER_CERTIFICATES_TASK_CLASS = 087 "com.unboundid.directory.server.tasks." + 088 "ReloadHTTPConnectionHandlerCertificatesTask"; 089 090 091 092 /** 093 * The name of the object class used in reload HTTP connection handler 094 * certificates task entries. 095 */ 096 @NotNull private static final String 097 OC_RELOAD_HTTP_CONNECTION_HANDLER_CERTIFICATES_TASK = 098 "ds-task-reload-http-connection-handler-certificates"; 099 100 101 102 /** 103 * The serial version UID for this serializable class. 104 */ 105 private static final long serialVersionUID = 842594962305532389L; 106 107 108 109 /** 110 * Creates a new uninitialized reload HTTP connection handler certificates 111 * task instance that should only be used for obtaining general information 112 * about this task, including the task name, description, and supported 113 * properties. 114 */ 115 public ReloadHTTPConnectionHandlerCertificatesTask() 116 { 117 this(null, null, null, null, null, null); 118 } 119 120 121 122 /** 123 * Creates a new reload HTTP connection handler certificates task with the 124 * provided information. 125 * 126 * @param taskID The task ID to use for this task. If it is 127 * {@code null} then a UUID will be generated for use 128 * as the task ID. 129 */ 130 public ReloadHTTPConnectionHandlerCertificatesTask( 131 @Nullable final String taskID) 132 { 133 this(taskID, null, null, null, null, null); 134 } 135 136 137 138 /** 139 * Creates a new reload HTTP connection handler certificates task with the 140 * provided information. 141 * 142 * @param taskID The task ID to use for this task. If it is 143 * {@code null} then a UUID will be generated 144 * for use as the task ID. 145 * @param scheduledStartTime The time that this task should start 146 * running. 147 * @param dependencyIDs The list of task IDs that will be required 148 * to complete before this task will be 149 * eligible to start. 150 * @param failedDependencyAction Indicates what action should be taken if 151 * any of the dependencies for this task do 152 * not complete successfully. 153 * @param notifyOnCompletion The list of e-mail addresses of individuals 154 * that should be notified when this task 155 * completes. 156 * @param notifyOnError The list of e-mail addresses of individuals 157 * that should be notified if this task does 158 * not complete successfully. 159 */ 160 public ReloadHTTPConnectionHandlerCertificatesTask( 161 @Nullable final String taskID, 162 @Nullable final Date scheduledStartTime, 163 @Nullable final List<String> dependencyIDs, 164 @Nullable final FailedDependencyAction failedDependencyAction, 165 @Nullable final List<String> notifyOnCompletion, 166 @Nullable final List<String> notifyOnError) 167 { 168 this(taskID, scheduledStartTime, dependencyIDs, failedDependencyAction, 169 null, notifyOnCompletion, null, notifyOnError, null, null, null); 170 } 171 172 173 174 /** 175 * Creates a new reload HTTP connection handler certificates task with the 176 * provided information. 177 * 178 * @param taskID The task ID to use for this task. If it is 179 * {@code null} then a UUID will be generated 180 * for use as the task ID. 181 * @param scheduledStartTime The time that this task should start 182 * running. 183 * @param dependencyIDs The list of task IDs that will be required 184 * to complete before this task will be 185 * eligible to start. 186 * @param failedDependencyAction Indicates what action should be taken if 187 * any of the dependencies for this task do 188 * not complete successfully. 189 * @param notifyOnStart The list of e-mail addresses of individuals 190 * that should be notified when this task 191 * starts running. 192 * @param notifyOnCompletion The list of e-mail addresses of individuals 193 * that should be notified when this task 194 * completes. 195 * @param notifyOnSuccess The list of e-mail addresses of individuals 196 * that should be notified if this task 197 * completes successfully. 198 * @param notifyOnError The list of e-mail addresses of individuals 199 * that should be notified if this task does 200 * not complete successfully. 201 * @param alertOnStart Indicates whether the server should send an 202 * alert notification when this task starts. 203 * @param alertOnSuccess Indicates whether the server should send an 204 * alert notification if this task completes 205 * successfully. 206 * @param alertOnError Indicates whether the server should send an 207 * alert notification if this task fails to 208 * complete successfully. 209 */ 210 public ReloadHTTPConnectionHandlerCertificatesTask( 211 @Nullable final String taskID, 212 @Nullable final Date scheduledStartTime, 213 @Nullable final List<String> dependencyIDs, 214 @Nullable final FailedDependencyAction failedDependencyAction, 215 @Nullable final List<String> notifyOnStart, 216 @Nullable final List<String> notifyOnCompletion, 217 @Nullable final List<String> notifyOnSuccess, 218 @Nullable final List<String> notifyOnError, 219 @Nullable final Boolean alertOnStart, 220 @Nullable final Boolean alertOnSuccess, 221 @Nullable final Boolean alertOnError) 222 { 223 super(taskID, RELOAD_HTTP_CONNECTION_HANDLER_CERTIFICATES_TASK_CLASS, 224 scheduledStartTime, dependencyIDs, failedDependencyAction, 225 notifyOnStart, notifyOnCompletion, notifyOnSuccess, notifyOnError, 226 alertOnStart, alertOnSuccess, alertOnError); 227 } 228 229 230 231 /** 232 * Creates a new reload HTTP connection handler certificates task from the 233 * provided entry. 234 * 235 * @param entry The entry to use to create this reload HTTP connection 236 * handler certificates task. 237 * 238 * @throws TaskException If the provided entry cannot be parsed as a reload 239 * HTTP connection handler certificates task entry. 240 */ 241 public ReloadHTTPConnectionHandlerCertificatesTask( 242 @NotNull final Entry entry) 243 throws TaskException 244 { 245 super(entry); 246 } 247 248 249 250 /** 251 * Creates a new reload HTTP connection handler certificates task from the 252 * provided set of task properties. 253 * 254 * @param properties The set of task properties and their corresponding 255 * values to use for the task. It must not be 256 * {@code null}. 257 * 258 * @throws TaskException If the provided set of properties cannot be used to 259 * create a valid reload HTTP connection handler 260 * certificates task. 261 */ 262 public ReloadHTTPConnectionHandlerCertificatesTask( 263 @NotNull final Map<TaskProperty,List<Object>> properties) 264 throws TaskException 265 { 266 super(RELOAD_HTTP_CONNECTION_HANDLER_CERTIFICATES_TASK_CLASS, properties); 267 } 268 269 270 271 /** 272 * {@inheritDoc} 273 */ 274 @Override() 275 @NotNull() 276 public String getTaskName() 277 { 278 return INFO_TASK_NAME_RELOAD_HTTP_CONNECTION_HANDLER_CERTIFICATES.get(); 279 } 280 281 282 283 /** 284 * {@inheritDoc} 285 */ 286 @Override() 287 @NotNull() 288 public String getTaskDescription() 289 { 290 return INFO_TASK_DESCRIPTION_RELOAD_HTTP_CONNECTION_HANDLER_CERTIFICATES. 291 get(); 292 } 293 294 295 296 /** 297 * {@inheritDoc} 298 */ 299 @Override() 300 @NotNull() 301 protected List<String> getAdditionalObjectClasses() 302 { 303 return Collections.singletonList( 304 OC_RELOAD_HTTP_CONNECTION_HANDLER_CERTIFICATES_TASK); 305 } 306}