{@inheritDoc}

@see jcifs.internal.smb2.ServerMessageBlock2#chain(jcifs.internal.smb2.ServerMessageBlock2)
346106
@Override
    public boolean chain ( ServerMessageBlock2 n ) {
        n.setTreeId(Smb2Constants.UNSPECIFIED_TREEID);
        return super.chain(n);
    }
623924
function(required, cb) {
      var chain = new Chain(config);
      chain.on(required, cb);
      return chain;
    }
617253
def add_chain(self, chain):
        
        with self._lock:
            chain.sort(key=lambda x: x.block_num)
            for block in chain:
                block_id = block.header_signature
                if block_id not in self._cache:
                    self._cache[block_id] = self.CachedValue(block)
                    if block.previous_block_id in self._cache:
                        self._cache[block.previous_block_id].inc_count()

            if time.time() > self._next_purge_time:
                self._purge_expired()
                self._next_purge_time = time.time() + self._purge_frequency
17490
public static void verifyChain(List<X509Certificate> chain)
	{
		if (chain == null || chain.isEmpty())
			throw new IllegalArgumentException("Must provide a chain that is non-null and non-empty");

		for (int i = 0; i < chain.size(); i++)
		{
			final X509Certificate certificate = chain.get(i);
			final int issuerIndex = (i != 0) ?
			                        i - 1 :
			                        0; // The index of the issuer is the previous cert (& the root must, of course, sign itself)
			final X509Certificate issuer = chain.get(issuerIndex);

			// Verify the certificate was indeed issued by the previous certificate in the chain
			try
			{
				certificate.verify(issuer.getPublicKey());
			}
			catch (GeneralSecurityException e)
			{
				final String msg = "Failure verifying " + certificate + " against claimed issuer " + issuer;

				throw new IllegalArgumentException(msg + ": " + e.getMessage(), e);
			}
		}
	}
985712
public function chain($chain)
    {
        $this->chained = collect($chain)->map(function ($job) {
            return serialize($job);
        })->all();

        return $this;
    }
1203954
function Chain() {
  this._stores = [];

  const len = arguments.length;
  for (let ii = 0; ii < len; ++ii) {
    const value = arguments[ii];
    if (value instanceof Store) {
      if (this._stores.indexOf(value) >= 0) continue;
      this._stores.push(value);
    }
  }
}
909592
@Override
    protected Smb2LockResponse createResponse ( CIFSContext tc, ServerMessageBlock2Request<Smb2LockResponse> req ) {
        return new Smb2LockResponse(tc.getConfig());
    }
60506
@Override public Response intercept(Chain chain) throws IOException {
    final Response response = chain.proceed(chain.request());

    final Headers headers = response.headers();
    final Map<String, List<String>> mappedHeaders = headers.toMultimap();
    final RateLimits limits = new RateLimits.DefaultParser().parse(mappedHeaders);

    listener.onRateLimitHeaderReceived(limits);

    return response;
  }
109070
def mine_block(chain: MiningChain, **kwargs: Any) -> MiningChain:
    
    if not isinstance(chain, MiningChain):
        raise ValidationError('`mine_block` may only be used on MiningChain instances')
    chain.mine_block(**kwargs)
    return chain
1104975
@Override
    public synchronized boolean isChainRunning(ChainData chain) {
        if (null == chain) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "isChainRunning(null): false");
            }
            return false;
        }
        return isChainRunning(chain.getName());
    }
202551
@Override public Response intercept(Chain chain) throws IOException {
    final Request request = chain.request();
    final Response response = chain.proceed(request);

    if (!response.isSuccessful()) {
      throw new CMAHttpException(request, response);
    }

    return response;
  }
739188
public static void displayChains(TraceComponent logger, ChainData[] chains,
                                     String message, String prefix) {
        if (!logger.isDebugEnabled()) {
            return;
        }
        if (chains == null || chains.length == 0) {
            chTrace.debugTrace(logger, prefix + ", no chains to trace (" + message + ")");
        } else {
            chTrace.traceChains(logger, Arrays.asList(chains), message, prefix);
        }
    }
33911
protected void validateCertificate(X509Certificate[] chain) throws com.ibm.wsspi.security.wim.exception.CertificateMapFailedException {
        // validate the certificate array
        if (chain == null || chain.length == 0) {
            throw new com.ibm.wsspi.security.wim.exception.CertificateMapFailedException();
        }

        for (X509Certificate cert : chain) {
            if (cert == null) {
                throw new com.ibm.wsspi.security.wim.exception.CertificateMapFailedException();
            }
        }
    }
259894
public static <T> Callback<T> chain(Iterable<Callback<T>> callbacks)
    {
        return new ChainCallback<T>(callbacks);
    }
658728
@Override
    public void chainQuiesced(ChainData chainData) {
        int oldState = chainState.getAndSet(ChainState.QUIESCED.val);
        if (oldState > ChainState.QUIESCED.val) {
            quiesceChain();
        }
    }
1064095
function chain(...fn) {
  return (...args) => fn.filter(i => !!i).forEach(i => i(...args));
}
195542
@Override
    public void prepare ( CommonServerMessageBlockRequest next ) {
        CommonServerMessageBlockResponse n = getNextResponse();
        if ( n != null ) {
            n.prepare(next);
        }
    }