Sets the delegate which will receive the events for the given upload request.
Those events will not be sent in broadcast, but only to the delegate.
@param uploadId uploadID of the upload request
@param delegate the delegate instance
764535
protected static void setUploadStatusDelegate(String uploadId, UploadStatusDelegate delegate) {
        if (delegate == null)
            return;

        uploadDelegates.put(uploadId, new WeakReference<>(delegate));
    }
257716
@Nonnull
  public FineUploader5Form setElementID (@Nonnull @Nonempty final String sElementID)
  {
    ValueEnforcer.notEmpty (sElementID, "ElementID");
    m_sFormElementID = sElementID;
    return this;
  }
112496
function(id) {
            var buttonId;

            if (qq.supportedFeatures.ajaxUploading) {
                buttonId = this._handler.getFile(id).qqButtonId;
            }
            else {
                buttonId = this._getButtonId(this._handler.getInput(id));
            }

            if (buttonId) {
                this._buttonIdsForFileIds[id] = buttonId;
            }
        }
765161
@Override
    public synchronized void write(final Event event) throws IOException
    {
        if (!acceptsEvents) {
            log.warn("Writer not ready, discarding event: {}", event);
            return;
        }

        delegate.write(event);
        uncommittedWriteCount++;

        commitIfNeeded();
    }
643585
public synchronized void setDelegate(Future<V> delegate) {
        if (delegateHolder.isCancelled()) {
            delegate.cancel(mayInterruptWhenCancellingDelegate);
        } else {
            this.delegate = delegate;
            delegateHolder.complete(delegate);
        }
    }
218118
public void addEvent(FlowEvent event) throws IOException {
    Put p = createPutForEvent(event);
    Table eventTable = null;
    try {
      eventTable = hbaseConnection
          .getTable(TableName.valueOf(Constants.FLOW_EVENT_TABLE));
      eventTable.put(p);
    } finally {
      if (eventTable != null) {
        eventTable.close();
      }
    }
  }
800082
private void onThumbnailUploaded(S3UploadEvent uploadEvent) {
        if (mDeleteAfterUploading) uploadEvent.getFile().delete();
        if (mStream != null) {
            mStream.setThumbnailUrl(uploadEvent.getDestinationUrl());
            sendStreamMetaData();
        }
    }
713925
@Override
    public void updatePortletEntity(IPortletEntity portletEntity) {
        portletEntity = this.unwrapEntity(portletEntity);
        this.delegatePortletEntityDao.updatePortletEntity(portletEntity);
    }
708352
@Override
    public void process(Object event) throws Exception {
        int secOffset = TimeUtils.secOffset();
        if (secOffset < UPLOAD_TIME_OFFSET_SEC) {
            JStormUtils.sleepMs((UPLOAD_TIME_OFFSET_SEC - secOffset) * 1000);
        } else if (secOffset == UPLOAD_TIME_OFFSET_SEC) {
            // do nothing
        } else {
            JStormUtils.sleepMs((60 - secOffset + UPLOAD_TIME_OFFSET_SEC) * 1000);
        }
        if (topologyMetricContext.getUploadedWorkerNum() > 0) {
            metricLogger.info("force upload metrics.");
            mergeAndUploadMetrics();
        }
    }
980109
private void execUpload(UploadPartRequest request) {
    File file = request.getFile();
    ListenableFuture<PartETag> futureTag =
        mExecutor.submit((Callable) () -> {
          PartETag partETag;
          AmazonClientException lastException;
          try {
            do {
              try {
                partETag = mClient.uploadPart(request).getPartETag();
                return partETag;
              } catch (AmazonClientException e) {
                lastException = e;
              }
            } while (mRetryPolicy.attempt());
          } finally {
            // Delete the uploaded or failed to upload file
            if (!file.delete()) {
              LOG.error("Failed to delete temporary file @ {}", file.getPath());
            }
          }
          throw new IOException("Fail to upload part " + request.getPartNumber()
              + " to " + request.getKey(), lastException);
        });
    mTagFutures.add(futureTag);
    LOG.debug("Submit upload part request. key={}, partNum={}, file={}, fileSize={}, lastPart={}.",
        mKey, request.getPartNumber(), file.getPath(), file.length(), request.isLastPart());
  }
414536
@Override
    public void setProtocol(String protocol) throws Exception {
        this.protocol = protocol;
        if ("rtmps".equals(protocol) || "rtmpt".equals(protocol) || "rtmpte".equals(protocol) || "rtmfp".equals(protocol)) {
            throw new Exception("Unsupported protocol specified, please use the correct client for the intended protocol.");
        }
    }
726463
public void setPullRequestEvents(java.util.Collection<PullRequestEvent> pullRequestEvents) {
        if (pullRequestEvents == null) {
            this.pullRequestEvents = null;
            return;
        }

        this.pullRequestEvents = new java.util.ArrayList<PullRequestEvent>(pullRequestEvents);
    }
1283772
private synchronized void putDelegate(final List<Tasklet> tasklets, final VortexFutureDelegate delegate) {
    for (final Tasklet tasklet : tasklets) {
      taskletFutureMap.put(tasklet.getId(), delegate);
    }
  }
450977
private void onSegmentUploaded(S3UploadEvent uploadEvent) {
        if (mDeleteAfterUploading) {
            boolean deletedFile = uploadEvent.getFile().delete();
            if (VERBOSE)
                Log.i(TAG, "Deleting uploaded segment. " + uploadEvent.getFile().getAbsolutePath() + " Succcess: " + deletedFile);
        }
        try {
            if (isKitKat() && mConfig.isAdaptiveBitrate() && isRecording()) {
                mLastRealizedBandwidthBytesPerSec = uploadEvent.getUploadByteRate();
                // Adjust video encoder bitrate per bandwidth of just-completed upload
                if (VERBOSE) {
                    Log.i(TAG, "Bandwidth: " + (mLastRealizedBandwidthBytesPerSec / 1000.0) + " kBps. Encoder: " + ((mVideoBitrate + mConfig.getAudioBitrate()) / 8) / 1000.0 + " kBps");
                }
                if (mLastRealizedBandwidthBytesPerSec < (((mVideoBitrate + mConfig.getAudioBitrate()) / 8))) {
                    // The new bitrate is equal to the last upload bandwidth, never inferior to MIN_BITRATE, nor superior to the initial specified bitrate
                    mVideoBitrate = Math.max(Math.min(mLastRealizedBandwidthBytesPerSec * 8, mConfig.getVideoBitrate()), MIN_BITRATE);
                    if (VERBOSE) {
                        Log.i(TAG, String.format("Adjusting video bitrate to %f kBps. Bandwidth: %f kBps",
                                mVideoBitrate / (8 * 1000.0), mLastRealizedBandwidthBytesPerSec / 1000.0));
                    }
                    adjustVideoBitrate(mVideoBitrate);
                }
            }
        } catch (Exception e) {
            Log.i(TAG, "OnSegUpload excep");
            e.printStackTrace();
        }
    }
928472
@Override
	public void handleRequest(final Request request) {
		if (!isInitialised()) {
			getOrCreateComponentModel().delegate = new SafetyContainerDelegate(UIContextHolder.
					getCurrent());
			setInitialised(true);
		}

		try {
			UIContext delegate = getComponentModel().delegate;
			UIContextHolder.pushContext(delegate);

			try {
				for (int i = 0; i < shim.getChildCount(); i++) {
					shim.getChildAt(i).serviceRequest(request);
				}

				delegate.doInvokeLaters();
			} finally {
				UIContextHolder.popContext();
			}
		} catch (final ActionEscape e) {
			// We don't want to catch ActionEscapes (e.g. ForwardExceptions)
			throw e;
		} catch (final Exception e) {
			if (isAjaxOrTargetedRequest(request)) {
				throw new SystemException(e.getMessage(), e);
			} else {
				setAttribute(ERROR_KEY, e);
			}
		}
	}
1071304
public void delegatedAccount_email_updateUsage_POST(String email) throws IOException {
		String qPath = "/email/domain/delegatedAccount/{email}/updateUsage";
		StringBuilder sb = path(qPath, email);
		exec(qPath, "POST", sb.toString(), null);
	}
1069516
public void setStructureId(String structureId) {

        try {
            m_structureId = new CmsUUID(structureId);
        } catch (Throwable e) {
            setThrowable(e);
        }
    }