* added to the queue (e.g., the queue is full).
*/
public static void enqueueRequest(AbstractOperation operation)
throws DirectoryException
{
ClientConnection clientConnection = operation.getClientConnection();
//Reject or accept the unauthenticated requests based on the configuration
// settings.
if ((directoryServer.rejectUnauthenticatedRequests ||
directoryServer.lockdownMode) &&
!clientConnection.getAuthenticationInfo().isAuthenticated())
{
switch(operation.getOperationType())
{
case ADD:
case COMPARE:
case DELETE:
case SEARCH:
case MODIFY:
case MODIFY_DN:
if (directoryServer.lockdownMode)
{
Message message = NOTE_REJECT_OPERATION_IN_LOCKDOWN_MODE.get();
throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM,
message);
}
else
{
Message message = ERR_REJECT_UNAUTHENTICATED_OPERATION.get();
throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM,
message);
}
case EXTENDED:
ExtendedOperationBasis extOp = (ExtendedOperationBasis) operation;
String requestOID = extOp.getRequestOID();
if (!((requestOID != null) &&
requestOID.equals(OID_START_TLS_REQUEST)))
{
if (directoryServer.lockdownMode)
{
Message message = NOTE_REJECT_OPERATION_IN_LOCKDOWN_MODE.get();
throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM,
message);
}
else
{
Message message = ERR_REJECT_UNAUTHENTICATED_OPERATION.get();
throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM,
message);
}
}
break;
}
}
// If the associated user is required to change their password before
// continuing, then make sure the associated operation is one that could
// result in the password being changed. If not, then reject it.
if (clientConnection.mustChangePassword())
{
switch (operation.getOperationType())
{
case ADD:
case COMPARE: