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