/* (non-Javadoc)
@see com.ibm.ws.sib.processor.impl.interfaces.DestinationHandler#choosePtoPOutputHandler(com.ibm.ws.sib.mfp.JsDestinationAddress)
425207
public OutputHandler choosePtoPOutputHandler(SIBUuid8 fixedMEUuid,
      SIBUuid8 preferredMEUuid,
      boolean localMessage,
      boolean forcePut,
      HashSet<SIBUuid8> scopedMEs)
  throws SIRollbackException, SIConnectionLostException, SIResourceException, SIErrorException 
  {
    // TODO Check this out
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "choosePtoPOutputHandler", new Object[] {fixedMEUuid,
                                                               preferredMEUuid,
                                                               Boolean.valueOf(localMessage),
                                                               Boolean.valueOf(forcePut),
                                                               scopedMEs});      

    OutputHandler result = getLinkStateHandler().choosePtoPOutputHandler(getUuid());
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "choosePtoPOutputHandler", result);

    return result;   
  }
927264
@Override
    public void createControlAdapter()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createControlAdapter");

        DestinationHandler dh = null;
        try
        {
            ItemStream is = getItemStream();
            if (is instanceof PubSubMessageItemStream)
            {
                dh = ((PubSubMessageItemStream) is).getDestinationHandler();
                controlAdapter = new QueuedMessage(this, dh, is);
            }
            else if (is instanceof MQLinkMessageItemStream)
            {
                dh = ((MQLinkMessageItemStream) is).getDestinationHandler();
                controlAdapter = new MQLinkQueuedMessage(this, dh, is);
            }
            else if (is instanceof PtoPMessageItemStream)
            {
                dh = ((PtoPMessageItemStream) is).getDestinationHandler();
                controlAdapter = new QueuedMessage(this, dh, is);
            }
            else
            {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(this, tc, "Unknown item stream type " + is);
            }
        } catch (Exception e)
        {
            FFDCFilter.processException(
                                        e,
                                        "com.ibm.ws.sib.processor.impl.store.items.MessageItem.createControlAdapter",
                                        "1:2585:1.244.1.40",
                                        this);

            SibTr.exception(tc, e);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "createControlAdapter");
    }
247365
public static void finalizeHandler(ServerBootstrap b, ChannelOperations.OnSetup
			opsFactory, ConnectionObserver childListener) {
		Objects.requireNonNull(b, "bootstrap");
		Objects.requireNonNull(opsFactory, "ops");
		Objects.requireNonNull(childListener, "childListener");

		BootstrapPipelineHandler pipeline = null;
		ChannelHandler handler = b.config().childHandler();
		if (handler instanceof BootstrapPipelineHandler) {
			pipeline = (BootstrapPipelineHandler) handler;
		}

		b.childHandler(new BootstrapInitializerHandler(pipeline, opsFactory, childListener));
	}
590636
public void updateQueuePointOutputHandler(
    SIBUuid8 newLocalisingMEUuid,
    OutputHandler outputHandler,
    SIBUuid8 existingUuid)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "updateQueuePointOutputHandler",
        new Object[] { newLocalisingMEUuid, outputHandler, existingUuid });

    synchronized(_queuePointOutputHandlers)
    {
      _queuePointOutputHandlers.remove(existingUuid);
      _queuePointOutputHandlers.put(newLocalisingMEUuid, outputHandler);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "updateQueuePointOutputHandler");
  }
938948
private <T> Observable<PollingState<T>> updateStateFromLocationHeaderOnPutAsync(final PollingState<T> pollingState) {
        return pollAsync(pollingState.locationHeaderLink(), pollingState.loggingContext())
                .flatMap(new Func1<Response<ResponseBody>, Observable<PollingState<T>>>() {
                    @Override
                    public Observable<PollingState<T>> call(Response<ResponseBody> response) {
                        int statusCode = response.code();
                        if (statusCode == 202) {
                            pollingState.withResponse(response);
                            pollingState.withStatus(AzureAsyncOperation.IN_PROGRESS_STATUS, statusCode);
                        } else if (statusCode == 200 || statusCode == 201) {
                            try {
                                pollingState.updateFromResponseOnPutPatch(response);
                            } catch (CloudException | IOException e) {
                                return Observable.error(e);
                            }
                        }
                        return Observable.just(pollingState);
                    }
                });
    }
1062517
@Override
    public void createInputHandlersForPtoP()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "createInputHandlersForPtoP", this);
        //Create a point to point input handler
        _baseDestinationHandler.
                        setInputHandler(new PtoPInputHandler(_baseDestinationHandler,
                                        _remoteSupport.getTargetProtocolItemStream()));

        //TODO is this a good idea?
        //We don't yet know what type of InputHandler to create

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "createInputHandlersForPtoP");
    }
1129874
@Override
	public void setOutputType(TypeInformation<OUT> outTypeInfo, ExecutionConfig executionConfig) {
		StreamingFunctionUtils.setOutputType(userFunction, outTypeInfo, executionConfig);
	}
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;
  }
580899
public JsDestinationAddress getReplyDestination()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getReplyDestination");
      SibTr.exit(tc, "getReplyDestination", null);
    }
    // No op for foreign destinations
    return null;
  }
555973
@Override
    public InetAddress getHostAddress(Object endPoint)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getHostAddress", endPoint);

        InetAddress address = null;
        if (endPoint instanceof CFEndPoint)
        {
            address = ((CFEndPoint) endPoint).getAddress();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getHostAddress", address);
        return address;
    }
124382
public JsDestinationAddress getRoutingDestination() {
    String name = (String)jmo.getField(ControlAccess.ROUTINGDESTINATION_VALUE_NAME);
    /* If the name is null, the RoutingDestination has never been set.        */
    if (name != null) {
      byte[] b = (byte[])jmo.getField(ControlAccess.ROUTINGDESTINATION_VALUE_MEID);
      return new JsDestinationAddressImpl(name
                                         ,false
                                         ,(b == null) ? null : new SIBUuid8(b)
                                         ,(String)jmo.getField(ControlAccess.ROUTINGDESTINATION_VALUE_BUSNAME)
                                         );
    }
    else {
      return null;
    }
  }
1184592
@Override
    public PubSubOutputHandler getPubSubOutputHandler(SIBUuid8 neighbourUUID)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "getPubSubOutputHandler", neighbourUUID);

        PubSubOutputHandler handler =
                        _pubSubRealization.getPubSubOutputHandler(neighbourUUID);

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

        return handler;
    }
759370
@Override
    public SibRaEndpointInvoker getEndpointInvoker()
                    throws ResourceAdapterInternalException {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
            SibTr.entry(this, TRACE, "getEndpointInvoker");

        // Create a Map of properties to pass into the new endpoint invoker. These are admin props that are
        // relevant in other classes so need to be passed through... NOTE: 'forwarder does not modify...'
        // is synonymous with 'producer does not modify...', so translate the forwarder property here to make
        // payload handling for incoming messages simpler
        Map<String, String> passThruProps = new HashMap<String, String>();
        passThruProps.put(JmsraConstants.CONSUMER_DOES_NOT_MODIFY_PAYLOAD_AFTER_GET, getConsumerDoesNotModifyPayloadAfterGet());
        passThruProps.put(JmsraConstants.PRODUCER_DOES_NOT_MODIFY_PAYLOAD_AFTER_SET, getForwarderDoesNotModifyPayloadAfterSet());

        // Create a new endpoint invoker, passing in the pass thru props
        JmsJcaEndpointInvokerImpl epInvoker = new JmsJcaEndpointInvokerImpl(passThruProps);

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
            SibTr.exit(this, TRACE, "getEndpointInvoker", epInvoker);

        return epInvoker;
    }
112139
public OutputHandler getQueuePointOutputHandler(SIBUuid8 meUuid)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getQueuePointOutputHandler", new Object[] { meUuid });

    OutputHandler result = null;

    synchronized(_queuePointOutputHandlers)
    {
      result = (OutputHandler) _queuePointOutputHandlers.get(meUuid);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getQueuePointOutputHandler", result);
    return result;
  }
1063808
protected ProcessOutputHandler createProcessOutputHandler()
    {
        //get process output handler
        String className=this.getConfigurationValue(FaxClientSpiConfigurationConstants.PROCESS_OUTPUT_HANDLER_PRE_FORMAT_PROPERTY_KEY);
        ProcessOutputHandler handler=null;
        if(className!=null)
        {
            //create new instance
            handler=(ProcessOutputHandler)ReflectionHelper.createInstance(className);
        }

        return handler;
    }
1351044
void insertOutputGate(final int pos, final ExecutionGate outputGate) {

		if (this.outputGates[pos] != null) {
			throw new IllegalStateException("Output gate at position " + pos + " is not null");
		}

		this.outputGates[pos] = outputGate;
	}
395375
private void cmdDuplicateMappingActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_duplicateMappingButtonActionPerformed
		Object[] currentSelection = mappingList.getSelectedValues();
		if (currentSelection == null) {
			JOptionPane.showMessageDialog(this, "No mappings have been selected", "ERROR", JOptionPane.ERROR_MESSAGE);
			return;
		}
		int confirm = JOptionPane.showConfirmDialog(
				this,
				"This will create copies of the selected mappings. \nNumber of mappings selected = "
				+ currentSelection.length + "\nContinue? ", 
				"Copy confirmation", 
				JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
		
		if (confirm == JOptionPane.NO_OPTION || confirm == JOptionPane.CANCEL_OPTION || confirm == JOptionPane.CLOSED_OPTION) {
			return;
		}
		OBDAModel controller = apic;
		URI current_srcuri = selectedSource.getSourceID();

		for (int i = 0; i < currentSelection.length; i++) {
			SQLPPTriplesMap mapping = (SQLPPTriplesMap) currentSelection[i];

			String id = mapping.getId();

			// Computing the next available ID
			int new_index = -1;
			for (int index = 0; index < 999999999; index++) {
				if (controller.indexOf(current_srcuri, id + "(" + index + ")") == -1) {
					new_index = index;
					break;
				}
			}
			String newId = id + "(" + new_index + ")";

			// inserting the new mapping
			try {

				SQLPPTriplesMap oldmapping = controller.getTriplesMap(id);
				SQLPPTriplesMap newmapping = new OntopNativeSQLPPTriplesMap(newId, oldmapping.getSourceQuery(),
                        oldmapping.getTargetAtoms());
				controller.addTriplesMap(current_srcuri, newmapping, false);

			} catch (DuplicateMappingException e) {
				JOptionPane.showMessageDialog(this, "Duplicate Mapping: " + newId);
				return;
			}
		}

	}