| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | */ |
| | | package org.opends.server.core; |
| | | |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.opends.messages.Message; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.opends.server.api.ClientConnection; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.controls.ControlDecoder; |
| | |
| | | */ |
| | | public class OperationWrapper implements Operation |
| | | { |
| | | // The wrapped operation. |
| | | /** The wrapped operation. */ |
| | | private Operation operation; |
| | | |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void addRequestControl(Control control) |
| | | { |
| | | operation.addRequestControl(control); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void addResponseControl(Control control) |
| | | { |
| | | operation.addResponseControl(control); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void appendErrorMessage(Message message) |
| | | { |
| | | operation.appendErrorMessage(message); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public CancelResult cancel(CancelRequest cancelRequest) |
| | | { |
| | | return operation.cancel(cancelRequest); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void abort(CancelRequest cancelRequest) |
| | | { |
| | | operation.abort(cancelRequest); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void disconnectClient( |
| | | DisconnectReason disconnectReason, |
| | | boolean sendNotification, |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public boolean dontSynchronize() |
| | | { |
| | | return operation.dontSynchronize(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Object getAttachment(String name) |
| | | { |
| | | return operation.getAttachment(name); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Map<String, Object> getAttachments() |
| | | { |
| | | return operation.getAttachments(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public DN getAuthorizationDN() |
| | | { |
| | | return operation.getAuthorizationDN(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Entry getAuthorizationEntry() |
| | | { |
| | | return operation.getAuthorizationEntry(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public CancelRequest getCancelRequest() |
| | | { |
| | | return operation.getCancelRequest(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public CancelResult getCancelResult() |
| | | { |
| | | return operation.getCancelResult(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public ClientConnection getClientConnection() |
| | | { |
| | | return operation.getClientConnection(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String[][] getCommonLogElements() |
| | | { |
| | | return operation.getCommonLogElements(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public long getConnectionID() |
| | | { |
| | | return operation.getConnectionID(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public MessageBuilder getErrorMessage() |
| | | { |
| | | return operation.getErrorMessage(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public DN getMatchedDN() |
| | | { |
| | | return operation.getMatchedDN(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public int getMessageID() |
| | | { |
| | | return operation.getMessageID(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public long getOperationID() |
| | | { |
| | | return operation.getOperationID(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public OperationType getOperationType() |
| | | { |
| | | return operation.getOperationType(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public long getProcessingStartTime() |
| | | { |
| | | return operation.getProcessingStartTime(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public long getProcessingStopTime() |
| | | { |
| | | return operation.getProcessingStopTime(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public long getProcessingTime() |
| | | { |
| | | return operation.getProcessingTime(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public long getProcessingNanoTime() |
| | | { |
| | | return operation.getProcessingNanoTime(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public List<String> getReferralURLs() |
| | | { |
| | | return operation.getReferralURLs(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public List<Control> getRequestControls() |
| | | { |
| | | return operation.getRequestControls(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public <T extends Control> T getRequestControl( |
| | | ControlDecoder<T> d)throws DirectoryException |
| | | { |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String[][] getRequestLogElements() |
| | | { |
| | | return operation.getRequestLogElements(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public List<Control> getResponseControls() |
| | | { |
| | | return operation.getResponseControls(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String[][] getResponseLogElements() |
| | | { |
| | | return operation.getResponseLogElements(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public ResultCode getResultCode() |
| | | { |
| | | return operation.getResultCode(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public boolean isInternalOperation() |
| | | { |
| | | return operation.isInternalOperation(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public boolean isSynchronizationOperation() |
| | | { |
| | | return operation.isSynchronizationOperation(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void operationCompleted() |
| | | { |
| | | operation.operationCompleted(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Object removeAttachment(String name) |
| | | { |
| | | return operation.removeAttachment(name); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void removeRequestControl(Control control) |
| | | { |
| | | operation.removeRequestControl(control); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void removeResponseControl(Control control) |
| | | { |
| | | operation.removeResponseControl(control); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Object setAttachment(String name, Object value) |
| | | { |
| | | return operation.setAttachment(name, value); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void setAttachments(Map<String, Object> attachments) |
| | | { |
| | | operation.setAttachments(attachments); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void setAuthorizationEntry(Entry authorizationEntry) |
| | | { |
| | | operation.setAuthorizationEntry(authorizationEntry); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void setDontSynchronize(boolean dontSynchronize) |
| | | { |
| | | operation.setDontSynchronize(dontSynchronize); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void setErrorMessage(MessageBuilder errorMessage) |
| | | { |
| | | operation.setErrorMessage(errorMessage); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void setInternalOperation(boolean isInternalOperation) |
| | | { |
| | | operation.setInternalOperation(isInternalOperation); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void setMatchedDN(DN matchedDN) |
| | | { |
| | | operation.setMatchedDN(matchedDN); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void setReferralURLs(List<String> referralURLs) |
| | | { |
| | | operation.setReferralURLs(referralURLs); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void setResponseData(DirectoryException directoryException) |
| | | { |
| | | operation.setResponseData(directoryException); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void setResultCode(ResultCode resultCode) |
| | | { |
| | | operation.setResultCode(resultCode); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void setSynchronizationOperation(boolean isSynchronizationOperation) |
| | | { |
| | | operation.setSynchronizationOperation(isSynchronizationOperation); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public final int hashCode() |
| | | { |
| | | return getClientConnection().hashCode() * (int) getOperationID(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public final boolean equals(Object obj) |
| | | { |
| | | if (this == obj) |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void toString(StringBuilder buffer) |
| | | { |
| | | operation.toString(buffer); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public synchronized final void checkIfCanceled(boolean signalTooLate) |
| | | throws CanceledOperationException { |
| | | operation.checkIfCanceled(signalTooLate); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void registerPostResponseCallback(Runnable callback) |
| | | { |
| | | operation.registerPostResponseCallback(callback); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void run() |
| | | { |
| | | operation.run(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public List<AdditionalLogItem> getAdditionalLogItems() |
| | | { |
| | | return operation.getAdditionalLogItems(); |
| | |
| | | /** |
| | | *{@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void addAdditionalLogItem(AdditionalLogItem item) |
| | | { |
| | | operation.addAdditionalLogItem(item); |