/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at
* trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
* add the following below this CDDL HEADER, with the fields enclosed
* by brackets "[]" replaced with your own identifying information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2006-2010 Sun Microsystems, Inc.
*/
/**
* This class defines a data structure that holds information about
* the result of processing by a plugin.
*/
mayInstantiate=true,
mayExtend=false,
mayInvoke=true)
public final class PluginResult
{
/**
* Defines a startup plugin result consisting of either continue
* skip further plugins, or stop startup with an error message.
*/
public static final class Startup
{
// Whether to continue startup.
private final boolean continueProcessing;
// Whether to invoke the rest of the plugins.
private final boolean continuePluginProcessing;
// An message explaining why startup should stop.
/**
* Construct a new startup plugin result.
*
* @param continueProcessing Whether to continue startup.
* @param continuePluginProcessing Whether to invoke the rest
* of the plugins.
* @param errorMessage An message explaining why startup should
* stop.
*/
boolean continuePluginProcessing,
{
this.continueProcessing = continueProcessing;
this.errorMessage = errorMessage;
}
/**
* Defines a continue processing startup plugin result.
*
* @return a continue processing startup plugin result.
*/
{
return DEFAULT_RESULT;
}
/**
* Defines a skip further plugin processing startup plugin result.
*
* @return a skip further plugin processing startup plugin
* result.
*/
{
}
/**
* Defines a new stop processing startup plugin result.
*
* @param errorMessage An message explaining why processing
* should stop for the given entry.
*
* @return a new stop processing startup plugin result.
*/
{
return new Startup(false, false, errorMessage);
}
/**
* Whether to continue startup.
*
* @return <code>true</code> if processing should continue
* or <code>false</code> otherwise.
*/
public boolean continueProcessing()
{
return continueProcessing;
}
/**
* Whether to invoke the rest of the plugins.
*
* @return <code>true</code> if the rest of the plugins should
* be invoked for <code>false</code> to skip the rest of the
* plugins.
*/
public boolean continuePluginProcessing()
{
return continuePluginProcessing;
}
/**
* Retrieves the error message if <code>continueProcessing</code>
* returned <code>false</code>.
*
* @return An error message explaining why processing should
* stop or <code>null</code> if none is provided.
*/
{
return errorMessage;
}
}
/**
* Defines a pre parse plugin result for core server operation
* processing consisting of either continue, skip further
* plugins, or stop operation processing with a result code,
* matched DN, referral URLs, and error message.
*/
public static final class PreParse
{
// Whether to continue operation processing.
private final boolean continueProcessing;
// Whether to invoke the rest of the plugins.
private final boolean continuePluginProcessing;
// An message explaining why processing should stop.
// The matched DN for this result.
// The set of referral URLs for this result.
// The result code for this result.
/**
* Construct a new pre parse plugin result.
*
* @param continueProcessing Whether to continue startup.
* @param continuePluginProcessing Whether to invoke the rest
* of the plugins.
* @param errorMessage An message explaining why processing
* should stop.
* @param resultCode The result code for this result.
* @param matchedDN The matched DN for this result.
* @param referralURLs The set of referral URLs for this result.
* stop.
*/
boolean continuePluginProcessing,
{
this.continueProcessing = continueProcessing;
this.errorMessage = errorMessage;
this.resultCode = resultCode;
this.referralURLs = referralURLs;
}
/**
* Defines a continue processing pre parse plugin result.
*
* @return a continue processing pre parse plugin result.
*/
{
return DEFAULT_RESULT;
}
/**
* Defines a skip further plugin processing pre parse plugin
* result.
*
* @return a skip further plugin processing pre parse plugin
* result.
*/
{
}
/**
* Defines a new stop processing pre parse plugin result.
*
* @param resultCode The result code for this result.
* @param errorMessage An message explaining why processing
* should stop.
* @param matchedDN The matched DN for this result.
* @param referralURLs The set of referral URLs for this result.
*
* @return a new stop processing pre parse plugin result.
*/
{
}
/**
* Contrust a new stop processing pre parse plugin result.
*
* @param resultCode The result code for this result.
* @param errorMessage An message explaining why processing
* should stop.
*
* @return a new stop processing pre parse plugin result.
*/
{
}
/**
* Whether to continue operation processing.
*
* @return <code>true</code> if processing should continue
* or <code>false</code> otherwise.
*/
public boolean continueProcessing()
{
return continueProcessing;
}
/**
* Whether to invoke the rest of the plugins.
*
* @return <code>true</code> if the rest of the plugins should
* be invoked for <code>false</code> to skip the rest of the
* plugins.
*/
public boolean continuePluginProcessing()
{
return continuePluginProcessing;
}
/**
* Retrieves the error message if <code>continueProcessing</code>
* returned <code>false</code>.
*
* @return An error message explaining why processing should
* stop or <code>null</code> if none is provided.
*/
{
return errorMessage;
}
/**
* Retrieves the result code for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the result code for the operation or <code>null</code>
* if none is provided.
*/
{
return resultCode;
}
/**
* Retrieves the matched DN for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the matched DN for the operation or <code>null</code>
* if none is provided.
*/
{
return matchedDN;
}
/**
* Retrieves the referral URLs for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the refferal URLs for the operation or
* <code>null</code> if none is provided.
*/
{
return referralURLs;
}
}
/**
* Defines a pre operation plugin result for core server operation
* processing consisting of either continue, skip further
* plugins, or stop operation processing with a result code,
* matched DN, referral URLs, and error message.
*/
public static final class PreOperation
{
// Whether to continue operation processing.
private final boolean continueProcessing;
// Whether to invoke the rest of the plugins.
private final boolean continuePluginProcessing;
// An message explaining why processing should stop.
// The matched DN for this result.
// The set of referral URLs for this result.
// The result code for this result.
/**
* Construct a new pre operation plugin result.
*
* @param continueProcessing Whether to continue startup.
* @param continuePluginProcessing Whether to invoke the rest
* of the plugins.
* @param errorMessage An message explaining why processing
* should stop.
* @param resultCode The result code for this result.
* @param matchedDN The matched DN for this result.
* @param referralURLs The set of referral URLs for this result.
* stop.
*/
boolean continuePluginProcessing,
{
this.continueProcessing = continueProcessing;
this.errorMessage = errorMessage;
this.resultCode = resultCode;
this.referralURLs = referralURLs;
}
/**
* Defines a continue processing pre operation plugin result.
*
* @return a continue processing pre operation plugin result.
*/
{
return DEFAULT_RESULT;
}
/**
* Defines a skip further plugin processing pre operation plugin
* result.
*
* @return a skip further plugin processing pre operation plugin
* result.
*/
{
}
/**
* Defines a new stop processing pre operation plugin result.
*
* @param resultCode The result code for this result.
* @param errorMessage An message explaining why processing
* should stop.
* @param matchedDN The matched DN for this result.
* @param referralURLs The set of referral URLs for this result.
*
* @return a new stop processing pre operation plugin result.
*/
{
}
/**
* Contrust a new stop processing pre operation plugin result.
*
* @param resultCode The result code for this result.
* @param errorMessage An message explaining why processing
* should stop.
*
* @return a new stop processing pre operation plugin result.
*/
{
}
/**
* Whether to continue operation processing.
*
* @return <code>true</code> if processing should continue
* or <code>false</code> otherwise.
*/
public boolean continueProcessing()
{
return continueProcessing;
}
/**
* Whether to invoke the rest of the plugins.
*
* @return <code>true</code> if the rest of the plugins should
* be invoked for <code>false</code> to skip the rest of the
* plugins.
*/
public boolean continuePluginProcessing()
{
return continuePluginProcessing;
}
/**
* Retrieves the error message if <code>continueProcessing</code>
* returned <code>false</code>.
*
* @return An error message explaining why processing should
* stop or <code>null</code> if none is provided.
*/
{
return errorMessage;
}
/**
* Retrieves the result code for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the result code for the operation or <code>null</code>
* if none is provided.
*/
{
return resultCode;
}
/**
* Retrieves the matched DN for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the matched DN for the operation or <code>null</code>
* if none is provided.
*/
{
return matchedDN;
}
/**
* Retrieves the referral URLs for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the refferal URLs for the operation or
* <code>null</code> if none is provided.
*/
{
return referralURLs;
}
}
/**
* Defines a post operation plugin result for core server operation
* processing consisting of either continue, skip further
* plugins, or stop operation processing with a result code,
* matched DN, referral URLs, and error message.
*/
public static final class PostOperation
{
// Whether to continue operation processing.
private final boolean continueProcessing;
// An message explaining why processing should stop.
// The matched DN for this result.
// The set of referral URLs for this result.
// The result code for this result.
/**
* Constructs a new post operation plugin result.
*
* @param continueProcessing Whether to continue startup.
* @param errorMessage An message explaining why processing
* should stop.
* @param resultCode The result code for this result.
* @param matchedDN The matched DN for this result.
* @param referralURLs The set of referral URLs for this result.
*/
{
this.continueProcessing = continueProcessing;
this.errorMessage = errorMessage;
this.resultCode = resultCode;
this.referralURLs = referralURLs;
}
/**
* Defines a continue processing post operation plugin result.
*
* @return a continue processing post operation plugin result.
*/
{
return DEFAULT_RESULT;
}
/**
* Defines a new stop processing post operation plugin result.
*
* @param resultCode The result code for this result.
* @param errorMessage An message explaining why processing
* should stop.
* @param matchedDN The matched DN for this result.
* @param referralURLs The set of referral URLs for this result.
*
* @return a new stop processing post operation plugin result.
*/
{
}
/**
* Contrust a new stop processing post operation plugin result.
*
* @param resultCode The result code for this result.
* @param errorMessage An message explaining why processing
* should stop.
*
* @return a new stop processing post operation plugin result.
*/
{
null);
}
/**
* Whether to continue operation processing.
*
* @return <code>true</code> if processing should continue
* or <code>false</code> otherwise.
*/
public boolean continueProcessing()
{
return continueProcessing;
}
/**
* Retrieves the error message if <code>continueProcessing</code>
* returned <code>false</code>.
*
* @return An error message explaining why processing should
* stop or <code>null</code> if none is provided.
*/
{
return errorMessage;
}
/**
* Retrieves the result code for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the result code for the operation or <code>null</code>
* if none is provided.
*/
{
return resultCode;
}
/**
* Retrieves the matched DN for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the matched DN for the operation or <code>null</code>
* if none is provided.
*/
{
return matchedDN;
}
/**
* Retrieves the referral URLs for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the refferal URLs for the operation or
* <code>null</code> if none is provided.
*/
{
return referralURLs;
}
}
/**
* Defines a post response plugin result for core server operation
* processing consisting of either continue or skip further
* plugins.
*/
public static final class PostResponse
{
// Whether to invoke the rest of the plugins.
private final boolean continuePluginProcessing;
new PostResponse(true);
/**
* Constructs a new post response plugin result.
*
* @param continuePluginProcessing Whether to invoke the rest
* of the plugins.
*/
{
}
/**
* Defines a continue processing post response plugin result.
*
* @return a continue processing post response plugin result.
*/
{
return DEFAULT_RESULT;
}
/**
* Defines a skip further plugin processing post response plugin
* result.
*
* @return a skip further plugin processing post response plugin
* result.
*/
{
return new PostResponse(false);
}
/**
* Whether to invoke the rest of the plugins.
*
* @return <code>true</code> if the rest of the plugins should
* be invoked for <code>false</code> to skip the rest of the
* plugins.
*/
public boolean continuePluginProcessing()
{
return continuePluginProcessing;
}
}
/**
* Defines a LDIF plugin result for import from LDIF
* processing consisting of either continue, skip further
* plugins, or stop processing with an error message.
*/
public static final class ImportLDIF
{
// Whether to continue operation processing.
private final boolean continueProcessing;
// Whether to invoke the rest of the plugins.
private final boolean continuePluginProcessing;
// An message explaining why processing should stop.
new ImportLDIF(true, true, null);
/**
* Construct a new import LDIF plugin result.
*
* @param continueProcessing Whether to continue startup.
* @param continuePluginProcessing Whether to invoke the rest
* of the plugins.
* @param errorMessage An message explaining why startup should
* stop.
*/
boolean continuePluginProcessing,
{
this.continueProcessing = continueProcessing;
this.errorMessage = errorMessage;
}
/**
* Defines a continue processing LDIF import plugin result.
*
* @return a continue processing LDIF import plugin result.
*/
{
return DEFAULT_RESULT;
}
/**
* Defines a skip further plugin processing LDIF import plugin
* result.
*
* @return a skip further plugin processing LDIF import plugin
* result.
*/
{
return new ImportLDIF(true, false, null);
}
/**
* Defines a new stop processing LDIF import plugin result.
*
* @param errorMessage An message explaining why processing
* should stop for the given entry.
*
* @return a new stop processing LDIF import plugin result.
*/
{
return new ImportLDIF(false, false, errorMessage);
}
/**
* Whether to continue operation processing.
*
* @return <code>true</code> if processing should continue
* or <code>false</code> otherwise.
*/
public boolean continueProcessing()
{
return continueProcessing;
}
/**
* Whether to invoke the rest of the plugins.
*
* @return <code>true</code> if the rest of the plugins should
* be invoked for <code>false</code> to skip the rest of the
* plugins.
*/
public boolean continuePluginProcessing()
{
return continuePluginProcessing;
}
/**
* Retrieves the error message if <code>continueProcessing</code>
* returned <code>false</code>.
*
* @return An error message explaining why processing should
* stop or <code>null</code> if none is provided.
*/
{
return errorMessage;
}
}
/**
* Defines a subordinate modify DN plugin result for core server
* operation processing consisting of either continue, skip further
* plugins, or stop operation processing with a result code,
* matched DN, referral URLs, and error message.
*/
public static final class SubordinateModifyDN
{
// Whether to continue operation processing.
private final boolean continueProcessing;
// Whether to invoke the rest of the plugins.
private final boolean continuePluginProcessing;
// An message explaining why processing should stop.
// The matched DN for this result.
// The set of referral URLs for this result.
// The result code for this result.
/**
* Construct a new subordinate modify DN plugin result.
*
* @param continueProcessing Whether to continue startup.
* @param continuePluginProcessing Whether to invoke the rest
* of the plugins.
* @param errorMessage An message explaining why processing
* should stop.
* @param resultCode The result code for this result.
* @param matchedDN The matched DN for this result.
* @param referralURLs The set of referral URLs for this result.
* stop.
*/
boolean continuePluginProcessing,
{
this.continueProcessing = continueProcessing;
this.errorMessage = errorMessage;
this.resultCode = resultCode;
this.referralURLs = referralURLs;
}
/**
* Defines a continue processing subordinate modify DN plugin
* result.
*
* @return a continue processing subordinate modify DN plugin
* result.
*/
{
return DEFAULT_RESULT;
}
/**
* Defines a skip further plugin processing subordinate modify DN
* plugin result.
*
* @return a skip further plugin processing subordinate modify DN
* plugin result.
*/
{
null);
}
/**
* Defines a new stop processing subordinate modify DN plugin
* result.
*
* @param resultCode The result code for this result.
* @param errorMessage An message explaining why processing
* should stop.
* @param matchedDN The matched DN for this result.
* @param referralURLs The set of referral URLs for this result.
*
* @return a new stop processing subordinate modify DN plugin
* result.
*/
{
return new SubordinateModifyDN(false, false, errorMessage,
}
/**
* Contrust a new stop processing subordinate modify DN plugin
* result.
*
* @param resultCode The result code for this result.
* @param errorMessage An message explaining why processing
* should stop.
*
* @return a new stop processing subordinate modify DN plugin
* result.
*/
{
return new SubordinateModifyDN(false, false, errorMessage,
}
/**
* Whether to continue operation processing.
*
* @return <code>true</code> if processing should continue
* or <code>false</code> otherwise.
*/
public boolean continueProcessing()
{
return continueProcessing;
}
/**
* Whether to invoke the rest of the plugins.
*
* @return <code>true</code> if the rest of the plugins should
* be invoked for <code>false</code> to skip the rest of the
* plugins.
*/
public boolean continuePluginProcessing()
{
return continuePluginProcessing;
}
/**
* Retrieves the error message if <code>continueProcessing</code>
* returned <code>false</code>.
*
* @return An error message explaining why processing should
* stop or <code>null</code> if none is provided.
*/
{
return errorMessage;
}
/**
* Retrieves the result code for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the result code for the operation or <code>null</code>
* if none is provided.
*/
{
return resultCode;
}
/**
* Retrieves the matched DN for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the matched DN for the operation or <code>null</code>
* if none is provided.
*/
{
return matchedDN;
}
/**
* Retrieves the referral URLs for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the refferal URLs for the operation or
* <code>null</code> if none is provided.
*/
{
return referralURLs;
}
}
/**
* Defines a subordinate delete plugin result for core server
* operation processing consisting of either continue, skip
* further plugins, or stop operation processing with a result
* code, matched DN, referral URLs, and error message.
*/
public static final class SubordinateDelete
{
// Whether to continue operation processing.
private final boolean continueProcessing;
// Whether to invoke the rest of the plugins.
private final boolean continuePluginProcessing;
// An message explaining why processing should stop.
// The matched DN for this result.
// The set of referral URLs for this result.
// The result code for this result.
/**
* Construct a new subordinate delete plugin result.
*
* @param continueProcessing Whether to continue startup.
* @param continuePluginProcessing Whether to invoke the rest
* of the plugins.
* @param errorMessage An message explaining why processing
* should stop.
* @param resultCode The result code for this result.
* @param matchedDN The matched DN for this result.
* @param referralURLs The set of referral URLs for this result.
* stop.
*/
boolean continuePluginProcessing,
{
this.continueProcessing = continueProcessing;
this.errorMessage = errorMessage;
this.resultCode = resultCode;
this.referralURLs = referralURLs;
}
/**
* Defines a continue processing subordinate delete plugin
* result.
*
* @return a continue processing subordinate delete plugin
* result.
*/
{
return DEFAULT_RESULT;
}
/**
* Defines a skip further plugin processing subordinate delete
* plugin result.
*
* @return a skip further plugin processing subordinate delete
* plugin result.
*/
{
null);
}
/**
* Defines a new stop processing subordinate delete plugin
* result.
*
* @param resultCode The result code for this result.
* @param errorMessage An message explaining why processing
* should stop.
* @param matchedDN The matched DN for this result.
* @param referralURLs The set of referral URLs for this result.
*
* @return a new stop processing subordinate delete plugin
* result.
*/
{
return new SubordinateDelete(false, false, errorMessage,
}
/**
* Contrust a new stop processing subordinate delete plugin
* result.
*
* @param resultCode The result code for this result.
* @param errorMessage An message explaining why processing
* should stop.
*
* @return a new stop processing subordinate delete plugin
* result.
*/
{
return new SubordinateDelete(false, false, errorMessage,
}
/**
* Whether to continue operation processing.
*
* @return <code>true</code> if processing should continue
* or <code>false</code> otherwise.
*/
public boolean continueProcessing()
{
return continueProcessing;
}
/**
* Whether to invoke the rest of the plugins.
*
* @return <code>true</code> if the rest of the plugins should
* be invoked for <code>false</code> to skip the rest of the
* plugins.
*/
public boolean continuePluginProcessing()
{
return continuePluginProcessing;
}
/**
* Retrieves the error message if <code>continueProcessing</code>
* returned <code>false</code>.
*
* @return An error message explaining why processing should
* stop or <code>null</code> if none is provided.
*/
{
return errorMessage;
}
/**
* Retrieves the result code for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the result code for the operation or <code>null</code>
* if none is provided.
*/
{
return resultCode;
}
/**
* Retrieves the matched DN for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the matched DN for the operation or <code>null</code>
* if none is provided.
*/
{
return matchedDN;
}
/**
* Retrieves the referral URLs for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the refferal URLs for the operation or
* <code>null</code> if none is provided.
*/
{
return referralURLs;
}
}
/**
* Defines an intermediate response plugin result for core server
* operation processing consisting of either continue, skip further
* plugins, or stop operation processing with a result code,
* matched DN, referral URLs, and error message.
*/
public static final class IntermediateResponse
{
// Whether to continue operation processing.
private final boolean continueProcessing;
// Whether to invoke the rest of the plugins.
private final boolean continuePluginProcessing;
// Whether to send the intermediate response to the client.
private final boolean sendResponse;
// An message explaining why processing should stop.
// The matched DN for this result.
// The set of referral URLs for this result.
// The result code for this result.
null);
/**
* Construct a new intermediate response plugin result.
*
* @param continueProcessing Whether to continue startup.
* @param continuePluginProcessing Whether to invoke the rest
* of the plugins.
* @param sendResponse Whether to send the intermediate response
* to the client.
* @param errorMessage An message explaining why processing
* should stop.
* @param resultCode The result code for this result.
* @param matchedDN The matched DN for this result.
* @param referralURLs The set of referral URLs for this result.
* stop.
*/
boolean continuePluginProcessing,
boolean sendResponse,
{
this.continueProcessing = continueProcessing;
this.errorMessage = errorMessage;
this.resultCode = resultCode;
this.referralURLs = referralURLs;
this.sendResponse = sendResponse;
}
/**
* Defines a continue processing intermediate response plugin
* result.
*
* @param sendResponse Whether to send the intermediate response
* to the client.
* @return a continue processing intermediate response plugin
* result.
*/
public static IntermediateResponse
{
if(sendResponse)
{
return DEFAULT_RESULT;
}
else
{
return new IntermediateResponse(true, true, sendResponse,
}
}
/**
* Defines a skip further plugin processing intermediate response
* plugin result.
*
* @param sendResponse Whether to send the intermediate response
* to the client.
*
* @return a skip further plugin processing intermediate response
* plugin result.
*/
public static IntermediateResponse
{
return new IntermediateResponse(true, false, sendResponse,
}
/**
* Defines a new stop processing intermediate response plugin
* result.
*
* @param sendResponse Whether to send the intermediate response
* to the client.
* @param resultCode The result code for this result.
* @param errorMessage An message explaining why processing
* should stop.
* @param matchedDN The matched DN for this result.
* @param referralURLs The set of referral URLs for this result.
*
* @return a new stop processing intermediate response plugin
* result.
*/
{
return new IntermediateResponse(false, false, sendResponse,
}
/**
* Contrust a new stop processing intermediate response plugin
* result.
*
* @param sendResponse Whether to send the intermediate response
* to the client.
* @param resultCode The result code for this result.
* @param errorMessage An message explaining why processing
* should stop.
*
* @return a new stop processing intermediate response plugin
* result.
*/
{
return new IntermediateResponse(false, false, sendResponse,
}
/**
* Whether to continue operation processing.
*
* @return <code>true</code> if processing should continue
* or <code>false</code> otherwise.
*/
public boolean continueProcessing()
{
return continueProcessing;
}
/**
* Whether to invoke the rest of the plugins.
*
* @return <code>true</code> if the rest of the plugins should
* be invoked for <code>false</code> to skip the rest of the
* plugins.
*/
public boolean continuePluginProcessing()
{
return continuePluginProcessing;
}
/**
* Whether to send the intermediate response to the client.
*
* @return <code>true</code> if the intermediate response should
* be sent to the client or <code>false</code> otherwise.
*/
public boolean sendResponse()
{
return sendResponse;
}
/**
* Retrieves the error message if <code>continueProcessing</code>
* returned <code>false</code>.
*
* @return An error message explaining why processing should
* stop or <code>null</code> if none is provided.
*/
{
return errorMessage;
}
/**
* Retrieves the result code for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the result code for the operation or <code>null</code>
* if none is provided.
*/
{
return resultCode;
}
/**
* Retrieves the matched DN for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the matched DN for the operation or <code>null</code>
* if none is provided.
*/
{
return matchedDN;
}
/**
* Retrieves the referral URLs for the operation
* if <code>continueProcessing</code> returned <code>false</code>.
*
* @return the refferal URLs for the operation or
* <code>null</code> if none is provided.
*/
{
return referralURLs;
}
}
/**
* Defines a post connect plugin result for client connection
* processing consisting of either continue, skip further
* plugins, or stop.
*/
public static final class PostConnect
{
// Whether to continue connection processing.
private final boolean continueProcessing;
// Whether to invoke the rest of the plugins.
private final boolean continuePluginProcessing;
// An message explaining why processing should stop.
// The disconnect reason that provides the generic cause for the
// disconnect.
// Whether to send a disconnect notification to the client.
private final boolean sendDisconnectNotification;
/**
* Construct a new post connect plugin result.
*
* @param continueProcessing Whether to continue startup.
* @param continuePluginProcessing Whether to invoke the rest
* of the plugins.
* @param errorMessage An message explaining why processing
* should stop.
* @param disconnectReason The generic cause for the disconnect.
* @param sendDisconnectNotification Whether to send a disconnect
* notification to the client.
*/
boolean continuePluginProcessing,
boolean sendDisconnectNotification)
{
this.continueProcessing = continueProcessing;
this.errorMessage = errorMessage;
this.disconnectReason = disconnectReason;
}
/**
* Defines a continue processing post connect plugin result.
*
* @return a continue processing post connect plugin result.
*/
{
return DEFAULT_RESULT;
}
/**
* Defines a skip further plugin processing post connect plugin
* result.
*
* @return a skip further plugin processing post connect plugin
* result.
*/
{
}
/**
* Defines a new stop processing post connect plugin result.
*
* @param disconnectReason The generic cause for the disconnect.
* @param sendDisconnectNotification Whether to send a disconnect
* notification to the client.
* @param errorMessage An message explaining why processing
* should stop for the given entry.
*
* @return a new stop processing post connect plugin result.
*/
{
return new PostConnect(false, false, errorMessage,
}
/**
* Whether to continue operation processing.
*
* @return <code>true</code> if processing should continue
* or <code>false</code> otherwise.
*/
public boolean continueProcessing()
{
return continueProcessing;
}
/**
* Whether to invoke the rest of the plugins.
*
* @return <code>true</code> if the rest of the plugins should
* be invoked for <code>false</code> to skip the rest of the
* plugins.
*/
public boolean continuePluginProcessing()
{
return continuePluginProcessing;
}
/**
* Retrieves the error message if <code>continueProcessing</code>
* returned <code>false</code>.
*
* @return An error message explaining why processing should
* stop or <code>null</code> if none is provided.
*/
{
return errorMessage;
}
/**
* The disconnect reason that provides the generic cause for the
* disconnect.
*
* @return the generic cause for the disconnect.
*/
{
return disconnectReason;
}
/**
* Indicates whether to try to provide notification to the client
* that the connection will be closed.
*
* @return <code>true</code> if notification should be provided or
* <code>false</code> otherwise.
*/
public boolean sendDisconnectNotification()
{
return sendDisconnectNotification;
}
}
/**
* Defines a post disconnect plugin result for client connection
* processing consisting of either continue or skip further
* plugins.
*/
public static final class PostDisconnect
{
// Whether to invoke the rest of the plugins.
private final boolean continuePluginProcessing;
new PostDisconnect(true);
/**
* Construct a new post disconnect plugin result.
*
* @param continuePluginProcessing Whether to invoke the rest
* of the plugins.
*/
{
}
/**
* Defines a continue processing post disconnect plugin result.
*
* @return a continue processing post disconnect plugin result.
*/
{
return DEFAULT_RESULT;
}
/**
* Defines a skip further plugin processing post disconnect
* plugin result.
*
* @return a skip further plugin processing post disconnect
* plugin result.
*/
{
return new PostDisconnect(false);
}
/**
* Whether to invoke the rest of the plugins.
*
* @return <code>true</code> if the rest of the plugins should
* be invoked for <code>false</code> to skip the rest of the
* plugins.
*/
public boolean continuePluginProcessing()
{
return continuePluginProcessing;
}
}
}