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 * docs/licenses/cddl.txt 011 * or http://www.opensource.org/licenses/cddl1.php. 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 * docs/licenses/cddl.txt. 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 2010-2021 Ping Identity Corporation 026 */ 027package com.unboundid.directory.sdk.ds.types; 028 029 030 031import java.io.Serializable; 032 033import com.unboundid.util.NotMutable; 034import com.unboundid.util.ThreadSafety; 035import com.unboundid.util.ThreadSafetyLevel; 036 037 038 039/** 040 * This class defines a structure which may be used to provide information about 041 * the result of the processing performed by a post-disconnect plugin. 042 */ 043@NotMutable() 044@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE) 045public final class PostDisconnectPluginResult 046 implements Serializable 047{ 048 /** 049 * A predefined result instance that indicates all processing completed 050 * successfully. 051 */ 052 public static final PostDisconnectPluginResult SUCCESS = 053 new PostDisconnectPluginResult(true); 054 055 056 057 /** 058 * The serial version UID for this serializable class. 059 */ 060 private static final long serialVersionUID = -4255986650298662738L; 061 062 063 064 // Indicates whether the server should continue processing other 065 // post-disconnect plugins. 066 private final boolean continuePluginProcessing; 067 068 069 070 /** 071 * Creates a new post-disconnect plugin result with the provided information. 072 * 073 * @param continuePluginProcessing Indicates whether to continue processing 074 * other post-disconnect plugins for the 075 * connection. 076 */ 077 public PostDisconnectPluginResult(final boolean continuePluginProcessing) 078 { 079 this.continuePluginProcessing = continuePluginProcessing; 080 } 081 082 083 084 /** 085 * Indicates whether to continue processing other post-disconnect plugins for 086 * the connection. 087 * 088 * @return {@code true} if the server should continue processing other 089 * post-disconnect plugins for the connection, or {@code false} if 090 * not. 091 */ 092 public boolean continuePluginProcessing() 093 { 094 return continuePluginProcessing; 095 } 096 097 098 099 /** 100 * Retrieves a string representation of this post-disconnect plugin result. 101 * 102 * @return A string representation of this post-disconnect plugin result. 103 */ 104 @Override() 105 public String toString() 106 { 107 final StringBuilder buffer = new StringBuilder(); 108 109 buffer.append("PostDisconnectPluginResult(continuePluginProcessing="); 110 buffer.append(continuePluginProcessing); 111 buffer.append(')'); 112 113 return buffer.toString(); 114 } 115}