/* (non-Javadoc)
@see com.ibm.ws.sib.processor.runtime.SIMPAttachedRemoteSubscriberControllable#getConsumerIterator()
186764
public SIMPIterator getConsumerIterator()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getConsumerIterator");

    InvalidOperationException finalE =
      new InvalidOperationException(
        nls.getFormattedMessage(
          "INTERNAL_MESSAGING_ERROR_CWSIP0005",
          new Object[] {"AttachedRemoteSubscriberControl.getConsumerIterator",
              "1:188:1.32",
                        this},
          null));

    SibTr.exception(tc, finalE);
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getConsumerIterator");
    throw finalE;
  }
90256
@Override
	public final void setConsumer(StreamConsumer<T> consumer) {
		checkNotNull(consumer);
		checkState(this.consumer == null, "Consumer has already been set");

		checkState(getCapabilities().contains(LATE_BINDING) || eventloop.tick() == createTick,
				LATE_BINDING_ERROR_MESSAGE, this);
		this.consumer = consumer;
		onWired();
		consumer.getAcknowledgement()
				.whenException(this::close)
				.whenComplete(acknowledgement);
	}
122810
protected Session getConsumerSession() throws JMSException {
        if (consumerSession == null) {
            synchronized (this) {
                if (consumerSession == null) {
                    consumerSession = createSession(Session.AUTO_ACKNOWLEDGE);
                }
            }
        }
        return consumerSession;
    }
743985
public static <T> ObjDoubleConsumer<T> objDoubleConsumer(CheckedObjDoubleConsumer<T> consumer) {
        return Unchecked.objDoubleConsumer(consumer, Unchecked.RETHROW_ALL);
    }
1192293
public SIMPIterator getPtoPInboundReceiverIterator()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getPtoPInboundReceiverIterator");

    TargetStreamManager tsm = inputHandler.getTargetStreamManager();
    SIMPIterator itr = tsm.getTargetStreamSetControlIterator();
  
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getPtoPInboundReceiverIterator", itr);

    return itr;
  }
804610
protected final Injector getInjector() {
        if (injector != null) {
            throw new IllegalStateException("Injector already created.");
        }
        try {
            injector = createInjector();
        }
        catch (Exception e) {
            LOG.error("Failed to created injector", e);
            throw new ProvisionException("Failed to create injector", e);
        }
        return injector;
    }
879504
public int getConsumerCount() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getConsumerCount");
        int consumerCount = syncConsumers.size();
        consumerCount += asyncConsumers.size();
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getConsumerCount", consumerCount);
        return consumerCount;
    }
1163827
public SIMPIterator getRemoteSubscriptions()
  { 
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getRemoteSubscriptions");

    List durableConsumers = new LinkedList();
    if(_anycastInputHandler!=null)
    {
      //we have a durable consumer
      durableConsumers.add(_anycastInputHandler);
    }

    AttachedRemoteSubscriberIterator remoteSubscriptionItr = 
      new AttachedRemoteSubscriberIterator(durableConsumers);
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getRemoteSubscriptions", remoteSubscriptionItr);
    return remoteSubscriptionItr;
  }
808002
@Override
    public Consumer createConsumer(Processor processor) throws Exception {
        LOG.debug(this.toString());

        if (direction == null || (direction.compareTo("") == 0)) {
            direction = "DIR_INPUT_ONLY";
        }
        if (mode == null || (mode.compareTo("") == 0)) {
            mode = "MODE_INPUT_PULL_UP";
        }
        if (trigger == null || (trigger.compareTo("") == 0)) {
            trigger = "TRIGGER_BOTH_EDGES";
        }

        int internalDirection = internalValueWithOR(direction);
        int internalMode = internalValueWithOR(mode);
        int internalTrigger = internalValueWithOR(trigger);

        GPIOPinConfig pinConfig = new GPIOPinConfig(0, Integer.parseInt(this.gpioId), internalDirection, internalMode,
                internalTrigger, state);

        GPIOPin pin = DeviceManager.open(GPIOPin.class, pinConfig);
        return new GPIOConsumer(this, processor, pin);
    }
1231033
public SIMPIterator getPubSubInboundReceiverIterator() {
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.entry(tc, "getPubSubInboundReceiverIterator");

		TargetStreamManager tsm = getInputHandler().getTargetStreamManager();
		SIMPIterator itr = tsm.getTargetStreamSetControlIterator();

		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.exit(tc, "getPubSubInboundReceiverIterator", itr);

		return itr;
	}
639945
@Override
    public ConsumerManager getLocalPtoPConsumerManager()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "getLocalPtoPConsumerManager");

        ConsumerManager consumerManager = null;

        consumerManager = _ptoPRealization.getLocalPtoPConsumerManager();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getLocalPtoPConsumerManager", consumerManager);

        return consumerManager;
    }
1370325
public ConsumerSession getConsumerSession()
      throws SISessionUnavailableException, SISessionDroppedException,
             SIConnectionUnavailableException, SIConnectionDroppedException
	{
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc,"getConsumerSession");          // f173765.2
      checkValid();                                                            // f173765.2
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc,"getConsumerSession");           // f173765.2
      
      return consumerSession;
	}
1175019
@Override
	public final MessageConsumer createConsumer(Destination destination) throws JMSException
    {
        return createConsumer(destination,null,false);
    }
245917
public JSConsumerSet getConsumerSet()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    { 
      SibTr.entry(tc, "getConsumerSet");
      SibTr.exit(tc, "getConsumerSet", consumerSet);
    }
    return consumerSet;
  }
864409
private final JSRemoteConsumerPoint findOrCreateJSRemoteConsumerPoint(String[] discriminators, int[] selectorDomains,
                                                        String[] selectors)
    throws ClosedException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "findOrCreateJSRemoteConsumerPoint",
          new Object[]{Arrays.toString(discriminators),
                       Arrays.toString(selectorDomains),
                       Arrays.toString(selectors)});

    String selectionCriteriasAsString = parent.convertSelectionCriteriasToString(
                                                  discriminators, selectorDomains, selectors);

    JSRemoteConsumerPoint aock = (JSRemoteConsumerPoint) consumerKeyTable.get(selectionCriteriasAsString);
    if (aock == null)
    {
      try
      {
        // create an JSRemoteConsumerPoint
        aock = new JSRemoteConsumerPoint();
        SelectionCriteria[] criterias = new SelectionCriteria[discriminators.length];
        ConsumableKey[] consumerKeys = new ConsumableKey[discriminators.length];
        OrderingContextImpl ocontext = null;
        SIBUuid12 connectionUuid = new SIBUuid12();

        if (discriminators.length > 1)
          ocontext = new OrderingContextImpl(); // create a new ordering context
        for (int i=0; i < discriminators.length; i++)
        {
          SelectorDomain domain = SelectorDomain.getSelectorDomain(selectorDomains[i]);
          criterias[i] = parent.createSelectionCriteria(discriminators[i], selectors[i], domain);

          // attach as many times as necessary
          consumerKeys[i] =
            (ConsumableKey) consumerDispatcher.attachConsumerPoint(
              aock,
              criterias[i],
              connectionUuid,
              false,
              false,
              null);

          if (ocontext != null)
            consumerDispatcher.joinKeyGroup(consumerKeys[i], ocontext);

          consumerKeys[i].start(); // in case we use a ConsumerKeyGroup, this is essential

        }

        if (parent.getCardinalityOne() || consumerDispatcher.isPubSub())
        {
          // effectively infinite timeout, since don't want to close the ConsumerKey if RME is inactive for
          // a while. Only close this ConsumerKey when start flushing this stream.
          // NOTE shared durable subs might not be cardinality one but we still do not want the streams
          // to flush on timeout
          //
          // Defect 516583, set the idleTimeout parameter to 0, not to Long.MAX_VALUE in order to have an
          // "infinite timeout".
          aock.init(this, selectionCriteriasAsString, consumerKeys, 0, am, criterias);
        }
        else
        {
          aock.init(
            this,
            selectionCriteriasAsString,
            consumerKeys,
            mp.getCustomProperties().get_ck_idle_timeout(),
            am,
            criterias);
        }
        consumerKeyTable.put(selectionCriteriasAsString, aock);
      }
      catch (Exception e)
      {
        // should not occur!
        FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.impl.AOStream.findOrCreateJSRemoteConsumerPoint",
          "1:2942:1.80.3.24",
          this);
        SibTr.exception(tc, e);

        aock = null;
        ClosedException e2 = new ClosedException(e.getMessage());
        // just using the ClosedException as a convenience
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
          SibTr.exit(tc, "findOrCreateJSRemoteConsumerPoint", e2);

        throw e2;
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "findOrCreateJSRemoteConsumerPoint", aock);

    return aock;
  }
1354815
public static <T, U, E extends Throwable> @NonNull BiConsumer<T, U> rethrowBiConsumer(final @NonNull ThrowingBiConsumer<T, U, E> consumer) {
    return consumer;
  }
515950
public SIMPIterator getPubSubDeliveryStreamSetReceiverIterator() {
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.entry(tc, "getPubSubDeliveryStreamSetReceiverIterator");

		SIMPIterator iterator = this.getInputHandler().getTargetStreamManager()
				.getTargetStreamSetControlIterator();

		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.entry(tc, "getPubSubDeliveryStreamSetReceiverIterator");
		return iterator;
	}