/*
(non-Javadoc)

@see com.ibm.ws.sib.processor.impl.interfaces.DestinationHandler#getPubSubOutputHandler(com.ibm.ws.sib.utils.SIBUuid8)
509515
public PubSubOutputHandler getPubSubOutputHandler(SIBUuid8 neighbourUUID)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "getPubSubOutputHandler", neighbourUUID);

        PubSubOutputHandler handler = null;

        //note that this does not obtain a read lock before attempting the get
        // Get the PubSub Output Handel
        if (_pubsubOutputHandlers != null)
            handler = _pubsubOutputHandlers.get(neighbourUUID);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getPubSubOutputHandler", handler);

        return handler;
    }
620577
public void assignQueuePointOutputHandler(
    OutputHandler outputHandler,
    SIBUuid8 messagingEngineUuid)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "assignQueuePointOutputHandler",
        new Object[] { outputHandler, messagingEngineUuid });

    synchronized (_queuePointOutputHandlers)
    {
      _queuePointOutputHandlers.put(messagingEngineUuid, outputHandler);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "assignQueuePointOutputHandler");
  }
1078513
public boolean flushQueuePointOutputHandler()
    throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "flushQueuePointOutputHandler");

    boolean done = true;

    for(Iterator nextHandler = _queuePointOutputHandlers.values().iterator();
        nextHandler.hasNext();)
    {
      Object handlerQ = nextHandler.next();
      // Try and drive flush on every output handler.
      // Note that we'll try and drive every output handler
      // even if an earlier output handler required a deferred
      // delete.
      if (handlerQ instanceof PtoPOutputHandler)
        done &= ((PtoPOutputHandler) handlerQ).flushAllForDelete();
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "flushQueuePointOutputHandler", new Boolean(done));
    return done;
  }
193907
public void setPubSubInputHandler(PubSubInputHandler pubSubInputHandler)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "setPubSubInputHandler", pubSubInputHandler);
    this.pubSubInputHandler = pubSubInputHandler;
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "setPubSubInputHandler");
  }
387247
public final UdpServer handle(BiFunction<? super UdpInbound, ? super UdpOutbound, ? extends Publisher<Void>> handler) {
		Objects.requireNonNull(handler, "handler");
		return doOnBound(c -> {
			if (log.isDebugEnabled()) {
				log.debug(format(c.channel(), "Handler is being applied: {}"), handler);
			}

			Mono.fromDirect(handler.apply((UdpInbound) c, (UdpOutbound) c))
			    .subscribe(c.disposeSubscriber());
		});
	}
364115
public final synchronized AnycastOutputHandler getAnycastOutputHandler()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "getAnycastOutputHandler");

        AnycastOutputHandler aoh = null;
        if (_ptoPRealization != null)
            aoh = _ptoPRealization.getAnycastOutputHandler(definition, false);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getAnycastOutputHandler", aoh);

        return aoh;
    }
793953
public SIBUuid8 getBusUuid()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(this, tc, "getBusUuid");
      SibTr.exit(tc, "getBusUuid", busID);
    }

    return busID;
  }
1154422
@Override
    public MPSubscription getSubscription(String subscriptionName)
                    throws SIDurableSubscriptionNotFoundException
    {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(
                        tc,
                        "getSubscription",
                        subscriptionName);

        HashMap durableSubs = _destinationManager.getDurableSubscriptionsTable();

        ConsumerDispatcher cd = null;
        synchronized (durableSubs)
        {
            //Look up the consumer dispatcher for this subId in the system durable subs list
            cd =
                            (ConsumerDispatcher) durableSubs.get(subscriptionName);

            // Check that the durable subscription exists
            if (cd == null)
            {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    SibTr.exit(tc, "getSubscription", "Durable sub not found");

                throw new SIDurableSubscriptionNotFoundException(
                                nls.getFormattedMessage(
                                                        "SUBSCRIPTION_DOESNT_EXIST_ERROR_CWSIP0072",
                                                        new Object[] { subscriptionName,
                                                                      _messageProcessor.getMessagingEngineName() },
                                                        null));
            }
        }

        MPSubscription mpSubscription = cd.getMPSubscription();
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getSubscription", mpSubscription);
        return mpSubscription;
    }
546465
public ControlHandler getControlHandler(ProtocolType type, SIBUuid8 sourceCellule)
  {
    throw new InvalidOperationException(
      nls.getFormattedMessage(
          "INTERNAL_MESSAGING_ERROR_CWSIP0005",
          new Object[] {
            "com.ibm.ws.sib.processor.proxyhandler.BusGroup",
            "1:651:1.54",
            getName() },
          null));
  }
1229901
@Override
	public BufferProvider getBufferProvider(JobID jobID, ChannelID sourceChannelID) throws IOException {
		EnvelopeReceiverList receiverList = getReceiverList(jobID, sourceChannelID, false);
		
		// check if the receiver is already gone
		if (receiverList == null) {
			return this.discardBufferPool;
		}

		if (!receiverList.hasLocalReceiver() || receiverList.hasRemoteReceiver()) {
			throw new IOException("The destination to be looked up is not a single local endpoint.");
		}
		

		ChannelID localReceiver = receiverList.getLocalReceiver();
		Channel channel = this.channels.get(localReceiver);
		
		if (channel == null) {
			// receiver is already canceled
			return this.discardBufferPool;
		}

		if (!channel.isInputChannel()) {
			throw new IOException("Channel context for local receiver " + localReceiver + " is not an input channel context");
		}

		return (InputChannel<?>) channel;
	}
487269
public SIBUuid8 getUuid()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getUuid");
      SibTr.exit(tc, "getUuid", _cmUuid);
    }

    return _cmUuid;
  }
276206
private void createInputHandlersForPubSub()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "createInputHandlersForPubSub");

        // Create the pub-sub input handler.
        _baseDestinationHandler.setInputHandler(
                        new PubSubInputHandler(
                                        _baseDestinationHandler,
                                        _pubSubRemoteSupport.getTargetProtocolItemStream(),
                                        _pubsubMessageItemStream,
                                        _proxyReferenceStream,
                                        _pubSubRemoteSupport.getSourceProtocolItemStream()));

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "createInputHandlersForPubSub");
    }
61257
public final SIBUuid8 getGuaranteedCrossBusSourceBusUUID() {
        byte[] b = (byte[]) getHdr2().getField(JsHdr2Access.GUARANTEEDXBUS_SET_SOURCEBUSUUID);
        if (b != null)
            return new SIBUuid8(b);
        return null;
    }
882632
protected final OnDemandStatsProducer getProducer(Class producerClass, String producerId, String category, String subsystem, boolean tracingSupported){
        OnDemandStatsProducer<T> producer = (OnDemandStatsProducer<T>) ProducerRegistryFactory.getProducerRegistryInstance().getProducer(producerId);

        if (producer == null) {
            producer = new OnDemandStatsProducer<T>(producerId, category, subsystem, getStatsFactory());
            producer.setTracingSupported(tracingSupported);
            ProducerRegistryFactory.getProducerRegistryInstance().registerProducer(producer);

            //check for annotations
            createClassLevelAccumulators(producer, producerClass);

            for (Method method : producerClass.getMethods()){
                createMethodLevelAccumulators(producer, method);
            }
        }

        try {
            return  (OnDemandStatsProducer) ProducerRegistryFactory.getProducerRegistryInstance().getProducer(producerId);
        } catch (ClassCastException e) {
            LOGGER.error("getProducer(): Unexpected producer type", e);
            return null;
        }
    }
498599
public AnycastInputHandler getAnycastInputHandler()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getAnycastInputHandler");
      SibTr.exit(tc, "getAnycastInputHandler", _parent);
    }
    return _parent;
  }
841433
public String getUuid()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getUuid");
    String uuid = null;
    if(_outputHandler!=null)
    {
      uuid = _outputHandler.getTopicSpaceUuid().toString();
    }
    else
    {
      uuid = _anycastInputHandler.getBaseDestinationHandler().
              getUuid().toString();
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getUuid", uuid);
    return uuid;
  }
1117597
public <X> DataStream<X> getSideOutput(OutputTag<X> sideOutputTag) {
		if (wasSplitApplied) {
			throw new UnsupportedOperationException("getSideOutput() and split() may not be called on the same DataStream. " +
				"As a work-around, please add a no-op map function before the split() call.");
		}

		sideOutputTag = clean(requireNonNull(sideOutputTag));

		// make a defensive copy
		sideOutputTag = new OutputTag<X>(sideOutputTag.getId(), sideOutputTag.getTypeInfo());

		TypeInformation<?> type = requestedSideOutputs.get(sideOutputTag);
		if (type != null && !type.equals(sideOutputTag.getTypeInfo())) {
			throw new UnsupportedOperationException("A side output with a matching id was " +
					"already requested with a different type. This is not allowed, side output " +
					"ids need to be unique.");
		}

		requestedSideOutputs.put(sideOutputTag, sideOutputTag.getTypeInfo());

		SideOutputTransformation<X> sideOutputTransformation = new SideOutputTransformation<>(this.getTransformation(), sideOutputTag);
		return new DataStream<>(this.getExecutionEnvironment(), sideOutputTransformation);
	}