Return the destinationHandler that the protocol itemstream is associated
with
169814
public BaseDestinationHandler getDestinationHandler()
  {
    if (tc.isEntryEnabled())  
    {
      SibTr.entry(tc, "getDestinationHandler");
      SibTr.exit(tc, "getDestinationHandler", destinationHandler);
    }      
    return destinationHandler;
  }
39386
@Override
    public int checkAbleToSend()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "checkAbleToSend", this);

        int result = DestinationHandler.OUTPUT_HANDLER_NOT_FOUND;

        // If both destination and queuepoint are sendAllowed then we can put the message
        // If we are a linkHandler we have no queue point so only check the destination def
        // on the other hand if this is an MQLink then we will check sendAllowed on
        // the local itemstream.
        boolean isSendAllowedOnLocalization = true;
        if (_baseDestinationHandler.isMQLink() || !_baseDestinationHandler.isLink())
            isSendAllowedOnLocalization = _pToPLocalMsgsItemStream.isSendAllowed();

        // Check if the queue point is send allowed (which can be set at the individual
        // message point level)
        if (!isSendAllowedOnLocalization)
            result = DestinationHandler.OUTPUT_HANDLER_SEND_ALLOWED_FALSE;
        else if (_pToPLocalMsgsItemStream != null)
        {
            if (!_pToPLocalMsgsItemStream.isQFull())
                result = DestinationHandler.OUTPUT_HANDLER_FOUND;
            else
                result = DestinationHandler.OUTPUT_HANDLER_ALL_HIGH_LIMIT;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "checkAbleToSend", Integer.valueOf(result));
        return result;
    }
975194
@Override
    public ControlHandler getControlHandler(
                                            ProtocolType type, SIBUuid8 sourceMEUuid, ControlMessage msg)
    {
        throw new InvalidOperationException(
                        nls.getFormattedMessage(
                                                "INTERNAL_MESSAGING_ERROR_CWSIP0005",
                                                new Object[] { "AbstractAliasDestinationHandler",
                                                              "1:681:1.67.1.22",
                                                              getBus() + " : " + getName() },
                                                null));
    }
212601
@Override
    public ControlHandler getControlHandler(SIBUuid8 sourceMEUuid)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(
                        tc,
                        "getControlHandler",
                        new Object[] { sourceMEUuid, this });

        ControlHandler msgHandler =
                        (ControlHandler) _localisationManager.
                                        getQueuePointOutputHandler(sourceMEUuid);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getControlHandler", msgHandler);

        return msgHandler;
    }
91087
@Nullable
  static ClientTransport getTransportFromPickResult(PickResult result, boolean isWaitForReady) {
    final ClientTransport transport;
    Subchannel subchannel = result.getSubchannel();
    if (subchannel != null) {
      transport = ((AbstractSubchannel) subchannel).obtainActiveTransport();
    } else {
      transport = null;
    }
    if (transport != null) {
      final ClientStreamTracer.Factory streamTracerFactory = result.getStreamTracerFactory();
      if (streamTracerFactory == null) {
        return transport;
      }
      return new ClientTransport() {
        @Override
        public ClientStream newStream(
            MethodDescriptor<?, ?> method, Metadata headers, CallOptions callOptions) {
          return transport.newStream(
              method, headers, callOptions.withStreamTracerFactory(streamTracerFactory));
        }

        @Override
        public void ping(PingCallback callback, Executor executor) {
          transport.ping(callback, executor);
        }

        @Override
        public InternalLogId getLogId() {
          return transport.getLogId();
        }

        @Override
        public ListenableFuture<SocketStats> getStats() {
          return transport.getStats();
        }
      };
    }
    if (!result.getStatus().isOk()) {
      if (result.isDrop()) {
        return new FailingClientTransport(result.getStatus(), RpcProgress.DROPPED);
      }
      if (!isWaitForReady) {
        return new FailingClientTransport(result.getStatus(), RpcProgress.PROCESSED);
      }
    }
    return null;
  }
1331478
def routingAreaUpdateComplete(ReceiveNpduNumbersList_presence=0):
    """"""
    a = TpPd(pd=0x3)
    b = MessageType(mesType=0xa)  # 00001010
    packet = a / b
    if ReceiveNpduNumbersList_presence is 1:
        c = ReceiveNpduNumbersList(ieiRNNL=0x26)
        packet = packet / c
    return packet
456814
function _getServerStreamingInterceptor(method_definition, channel, emitter) {
  var deserialize = common.wrapIgnoreNull(
    method_definition.responseDeserialize);
  var serialize = method_definition.requestSerialize;
  return function (options) {
    var batch_state = {
      completed_ops: [],
      deferred_batches: []
    };
    var call = getCall(channel, method_definition.path, options);
    var final_requester = {};
    var first_listener;
    var get_listener = function() {
      return first_listener;
    };
    final_requester.start = function(metadata, listener) {
      first_listener = listener;
      metadata = metadata.clone();
      var metadata_batch = {
        [grpc.opType.SEND_INITIAL_METADATA]: metadata._getCoreRepresentation(),
        [grpc.opType.RECV_INITIAL_METADATA]: true
      };
      var callback = function(err, response) {
        if (err) {
          // The call has stopped for some reason. A non-OK status will arrive
          // in the other batch.
          return;
        }
        first_listener.onReceiveMetadata(
          Metadata._fromCoreRepresentation(response.metadata));
      };
      batch_state = _startBatchIfReady(call, metadata_batch, batch_state,
                                       callback);
      var status_batch = {
        [grpc.opType.RECV_STATUS_ON_CLIENT]: true
      };
      call.startBatch(status_batch, function(err, response) {
        if (err) {
          emitter.emit('error', err);
          return;
        }
        response.status.metadata = Metadata._fromCoreRepresentation(
          response.status.metadata);
        first_listener.onReceiveStatus(response.status);
      });
    };
    final_requester.sendMessage = function(argument) {
      var message = serialize(argument);
      if (options) {
        message.grpcWriteFlags = options.flags;
      }
      var send_batch = {
        [grpc.opType.SEND_MESSAGE]: message
      };
      var callback = function(err, response) {
        if (err) {
          // The call has stopped for some reason. A non-OK status will arrive
          // in the other batch.
          return;
        }
      };
      batch_state = _startBatchIfReady(call, send_batch, batch_state, callback);
    };
    final_requester.halfClose = function() {
      var batch = {
        [grpc.opType.SEND_CLOSE_FROM_CLIENT]: true
      };
      batch_state = _startBatchIfReady(call, batch, batch_state, function() {});
    };
    final_requester.recvMessageWithContext = function(context) {
      var recv_batch = {
        [grpc.opType.RECV_MESSAGE]: true
      };
      var callback = _getStreamReadCallback(emitter, call,
        get_listener, deserialize);
      batch_state = _startBatchIfReady(call, recv_batch, batch_state, callback);
    };
    final_requester.cancel = function() {
      call.cancel();
    };
    final_requester.cancelWithStatus = function(code, details) {
      call.cancelWithStatus(code, details)
    };
    final_requester.getPeer = function() {
      return call.getPeer();
    };
    return new InterceptingCall(null, final_requester);
  };
}
894328
public Optional<EndpointRouter> getRouter(EndpointRouter.Protocol protocol) {
      return endpointRouters.stream().filter(r -> r.getProtocol() == protocol).findFirst();
   }
1073277
@Override
    public PortletDelegationDispatcher getRequestDispatcher(
            PortletRequest portletRequest, IPortletWindowId portletWindowId) {
        final HttpServletRequest request =
                this.portalRequestUtils.getPortletHttpRequest(portletRequest);
        final IPerson person = this.personManager.getPerson(request);

        final IPortletWindow portletWindow =
                this.portletWindowRegistry.getPortletWindow(request, portletWindowId);

        final IPortletWindowId delegationParentId = portletWindow.getDelegationParentId();
        if (delegationParentId == null) {
            throw new IllegalArgumentException(
                    "Portlet window '"
                            + portletWindow
                            + "' is not a delegate window and cannot be delgated to.");
        }

        return new PortletDelegationDispatcherImpl(
                portletWindow,
                person.getID(),
                this.portalRequestUtils,
                this.personManager,
                this.portletRenderer,
                this.portalUrlProvider,
                this.portletDelegationManager);
    }
1111424
private Process getPackageHandler(ProcessInstance masterInstance, Integer eventType) {
        Process process = getProcessDefinition(masterInstance);
        Process handler = getPackageHandler(process.getPackageName(), eventType);
        if (handler != null && handler.getName().equals(process.getName())) {
            logger.warn("Package handler recursion is not allowed. "
                    + "Define an embedded handler in package handler: " + handler.getLabel());
        }
        return handler;
    }
1108397
function getRoutedMessageHandler(params, onMessage, onError, isRetryPatchMode) {
  var expectedBatchMessageCount = 0;
  var numBatchesDetermined = false;
  var messageBatchBuffer = [];
  var lastSeenDataTime = 0;
  var lastSeenDataBatchTime = 0;

  function composeDataBatches(dataArray) {
    if (dataArray.length === 0) {
      if (messageBatchBuffer.length > 0) {
        console.error('Composed an empty data batch despite having data in the buffer!');
      }
      return null;
    }

    var errorOccurred = false;
    var basisData = dataArray[0];
    var expectedTimeStamp = basisData.logicalTimestampMs;
    lastSeenDataBatchTime = expectedTimeStamp;
    dataArray.slice(1).forEach(function (batch) {
      if (batch.logicalTimestampMs !== expectedTimeStamp) {
        errorOccurred = true;
      } else {
        basisData.data = basisData.data.concat(batch.data);
      }
    });

    if (errorOccurred) {
      console.error('Bad timestamp pairs when flushing data batches!  Inconsistent data!');
      return null;
    }
    return basisData;
  }

  function flushBuffer() {
    if (numBatchesDetermined && messageBatchBuffer.length === expectedBatchMessageCount && messageBatchBuffer.length > 0) {
      onMessage(composeDataBatches(messageBatchBuffer));
      messageBatchBuffer = [];
    }
  }

  return {
    getLatestBatchTimeStamp: function () {
      return lastSeenDataBatchTime;
    },
    onMessage: function messageReceived(msg) {
      if (!msg.type && msg.hasOwnProperty('error')) {
        onMessage(msg);
        return;
      }
      switch (msg.type) {
        case 'data':
          if (lastSeenDataTime && lastSeenDataTime !== msg.logicalTimestampMs) {
            // if zero time series are encountered, then no metadata arrives, but data batches arrive with differing
            // timestamp as the only evidence of a stream block
            numBatchesDetermined = true;
          }
          lastSeenDataTime = msg.logicalTimestampMs;
          messageBatchBuffer.push(msg);
          if (!numBatchesDetermined) {
            expectedBatchMessageCount++;
          } else if (messageBatchBuffer.length === expectedBatchMessageCount) {
            flushBuffer();
          }
          break;
        case 'message':
          if (msg.message && msg.message.messageCode === 'JOB_RUNNING_RESOLUTION') {
            numBatchesDetermined = true;
            flushBuffer();
          }
          onMessage(msg);
          break;
        case 'metadata':
        case 'event':
          onMessage(msg);
          break;
        case 'control-message':
          if (isRetryPatchMode && !numBatchesDetermined) {
            break;
          }
          onMessage(msg);
          break;
        case 'error':
          if (onError) {
            onError(msg);
          }
          break;
        default:
          console.log('Unrecognized message type.');
          break;
      }
      flushBuffer();
    }
  };
}
1083638
private NettyClientStream.TransportState clientStream(Http2Stream stream) {
    return stream == null ? null : (NettyClientStream.TransportState) stream.getProperty(streamKey);
  }
1365098
synchronized ContentHandler getContentHandler()
        throws IOException
    {
        String contentType = stripOffParameters(getContentType());
        ContentHandler handler = null;
        if (contentType == null) {
            if ((contentType = guessContentTypeFromName(url.getFile())) == null) {
                contentType = guessContentTypeFromStream(getInputStream());
            }
        }

        if (contentType == null) {
            return UnknownContentHandler.INSTANCE;
        }
        try {
            handler = (ContentHandler) handlers.get(contentType);
            if (handler != null)
                return handler;
        } catch(Exception e) {
        }

        if (factory != null)
            handler = factory.createContentHandler(contentType);
        if (handler == null) {
            try {
                handler = lookupContentHandlerClassFor(contentType);
            } catch(Exception e) {
                e.printStackTrace();
                handler = UnknownContentHandler.INSTANCE;
            }
            handlers.put(contentType, handler);
        }
        return handler;
    }
665292
public final AnycastOutputHandler getAnycastOutputHandler(DestinationDefinition definition,
                                                            boolean restartFromStaleBackup)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, 
                  "getAnycastOutputHandler",
                  new Object[]{ 
                    definition,
                    Boolean.valueOf(restartFromStaleBackup)});
                  
    if (_anycastOutputHandler == null)
    { // lazy creation of AnycastOutputHandler
      try
      {
        // check if aoContainerItemStream already exists
        if (_aoContainerItemStream == null)
        {
          // need to create one first
          AOContainerItemStream aostream = new AOContainerItemStream(null, null);
          LocalTransaction tran = _baseDestinationHandler.getTransactionManager().createLocalTransaction(true);
          _baseDestinationHandler.addItemStream(aostream, (Transaction) tran);
          tran.commit();

          _aoContainerItemStream = aostream;
        }

        // TODO - should be using something better than System.currentTimeMillis() for the dmeVersion.
        _anycastOutputHandler =
          new AnycastOutputHandler(
            definition.getName(), definition.getUUID(), 
            definition.isReceiveExclusive(),
            _baseDestinationHandler,
            null,
            _aoContainerItemStream,
            _messageProcessor,
            _destinationManager.getAsyncUpdateThread(),
            _destinationManager.getPersistLockThread(),
            System.currentTimeMillis(),
            restartFromStaleBackup);
      }
      catch (Exception e)
      {
        // Exception shouldn't occur so FFDC.
        FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.impl.destination.AbstractRemoteSupport.getAnycastOutputHandler",
          "1:834:1.25",
          this);

        SibTr.exception(tc, e);
        
        SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0003",
            new Object[] {
              "com.ibm.ws.sib.processor.impl.destination.AbstractRemoteSupport",
              "1:842:1.25",
              e,
              _baseDestinationHandler.getName() });

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
          SibTr.exit(tc, "getAnycastOutputHandlerInternal", "SIErrorException");
                    
        throw new SIErrorException(nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0003",
            new Object[] {
             "com.ibm.ws.sib.processor.impl.destination.AbstractRemoteSupport.getAnycastOutputHandler",
             "1:853:1.25",
              e,
              _baseDestinationHandler.getName() },
            null),
            e);
      }
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getAnycastOutputHandler", _anycastOutputHandler);

    return _anycastOutputHandler;
  }
1070593
private long processNackWithReturnValue(ControlNack nackMsg)
                    throws SIResourceException
    {
        // This is called by a PubSubOutputHandler when it finds Unknown
        // ticks in it's own stream and need the InputStream to resend them
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "processNackWithReturnValue", nackMsg);

        long returnValue = -1;

        // The upstream cellule for this stream is stored in the originStreamMap
        // unless we were the originator.
        SIBUuid12 stream = nackMsg.getGuaranteedStreamUUID();

        if (_sourceStreamManager.hasStream(stream))
        {
            // 242139: Currently we get back to here for every processNack
            // that the InternalOutputStream handles. This is an error but
            // a harmles one. For now the fix is to avoid throwing an exception 
            // as the InternalOutputstream has in fact satisfied the Nack correctly.  
            // The longer term fix is to writeCombined range into the IOS not just the
            // value

            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, "Ignoring processNack on sourceStream at PubSubInputHandler");

            returnValue = _sourceStreamManager.getStreamSet().getStream(nackMsg.getPriority(), nackMsg.getReliability()).getCompletedPrefix();
        }
        else
        {
            // Else we are an IME
            //  send nacks if necessary
            _internalInputStreamManager.processNack(nackMsg);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "processNackWithReturnValue", new Long(returnValue));

        return returnValue;

    }
470548
public void reconstitute(BaseDestinationHandler destinationHandler) throws SIResourceException
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "reconstitute", destinationHandler); 

    super.reconstitute(destinationHandler);
      
    if (tc.isEntryEnabled())
    {
      SibTr.exit(tc, "reconstitute");           
    }
  }
311371
@Deprecated
  public AndroidChannelBuilder transportExecutor(@Nullable Executor transportExecutor) {
    try {
      OKHTTP_CHANNEL_BUILDER_CLASS
          .getMethod("transportExecutor", Executor.class)
          .invoke(delegateBuilder, transportExecutor);
      return this;
    } catch (Exception e) {
      throw new RuntimeException("Failed to invoke transportExecutor on delegate builder", e);
    }
  }