This method should only be called when the PtoPOutputHandler was created
for a Link with an unknown targetCellule and WLM has now told us correct
targetCellule.
510570
public void updateTargetCellule(SIBUuid8 targetMEUuid) throws SIResourceException 
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "updateTargetCellule", targetMEUuid);
     
    this.targetMEUuid = targetMEUuid;
    
    sourceStreamManager.updateTargetCellule(targetMEUuid);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "updateTargetCellule");
   
   }
79469
private void processAckExpected(ControlAckExpected ackExpMsg)
                    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, "processAckExpected", ackExpMsg);

        // The upstream cellule for this stream is stored in the originStreamMap
        // unless we were the originator.
        SIBUuid12 streamID = ackExpMsg.getGuaranteedStreamUUID();
        int priority = ackExpMsg.getPriority().intValue();
        Reliability reliability = ackExpMsg.getReliability();

        if (_internalInputStreamManager.hasStream(streamID, priority, reliability))
        {
            _internalInputStreamManager.processAckExpected(ackExpMsg);
        }
        else
        {
            _targetStreamManager.handleAckExpectedMessage(ackExpMsg);
        }

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

    }
696925
@Override
    public void aborted(DataBinder parameters, Throwable throwable) {
        try { first.aborted(parameters, throwable);  } catch (Throwable t) {}
        try { second.aborted(parameters, throwable); } catch (Throwable t) {}
    }
935049
protected void processLink(Tag tag, String attr, CmsRelationType type) {

        if (tag.getAttribute(attr) == null) {
            return;
        }
        CmsLink link = null;
        switch (m_mode) {
            case PROCESS_LINKS:
                // macros are replaced with links
                link = m_linkTable.getLink(CmsMacroResolver.stripMacro(tag.getAttribute(attr)));
                if (link != null) {
                    // link management check
                    String l = link.getLink(m_cms);
                    if (TAG_PARAM.equals(tag.getTagName())) {
                        // HACK: to distinguish link parameters the link itself has to end with '&' or '?'
                        // another solution should be a kind of macro...
                        if (!l.endsWith(CmsRequestUtil.URL_DELIMITER)
                            && !l.endsWith(CmsRequestUtil.PARAMETER_DELIMITER)) {
                            if (l.indexOf(CmsRequestUtil.URL_DELIMITER) > 0) {
                                l += CmsRequestUtil.PARAMETER_DELIMITER;
                            } else {
                                l += CmsRequestUtil.URL_DELIMITER;
                            }
                        }
                    }
                    // set the real target
                    tag.setAttribute(attr, CmsEncoder.escapeXml(l));
                }
                break;
            case REPLACE_LINKS:
                // links are replaced with macros
                String targetUri = tag.getAttribute(attr);
                if (CmsStringUtil.isNotEmpty(targetUri)) {
                    String internalUri = null;
                    if (!CmsMacroResolver.isMacro(targetUri)) {
                        m_cms.getRequestContext().setAttribute(
                            CmsDefaultLinkSubstitutionHandler.DONT_USE_CURRENT_SITE_FOR_WORKPLACE_REQUESTS,
                            "true");
                        internalUri = OpenCms.getLinkManager().getRootPath(m_cms, targetUri, m_relativePath);
                    }
                    // HACK: to distinguish link parameters the link itself has to end with '&' or '?'
                    // another solution should be a kind of macro...
                    if (!TAG_PARAM.equals(tag.getTagName())
                        || targetUri.endsWith(CmsRequestUtil.URL_DELIMITER)
                        || targetUri.endsWith(CmsRequestUtil.PARAMETER_DELIMITER)) {
                        if (internalUri != null) {
                            internalUri = rewriteUri(internalUri);
                            // this is an internal link
                            link = m_linkTable.addLink(type, internalUri, true);
                            // link management check
                            link.checkConsistency(m_cms);

                            if ("IMG".equals(tag.getTagName()) || TAG_AREA.equals(tag.getTagName())) {
                                // now ensure the image has the "alt" attribute set
                                setAltAttributeFromTitle(tag, internalUri);
                            }
                        } else {
                            // this is an external link
                            link = m_linkTable.addLink(type, targetUri, false);
                        }
                    }
                    if (link != null) {
                        tag.setAttribute(attr, CmsMacroResolver.formatMacro(link.getName()));
                    }
                }
                break;
            default: // empty
        }
    }
6813
final void _deleteWALFileAfterProcessing (@Nonnull @Nonempty final String sWALFilename)
  {
    ValueEnforcer.notEmpty (sWALFilename, "WALFilename");
    final File aWALFile = m_aIO.getFile (sWALFilename);
    if (FileOperationManager.INSTANCE.deleteFile (aWALFile).isFailure ())
    {
      if (LOGGER.isErrorEnabled ())
        LOGGER.error ("Failed to delete WAL file '" + aWALFile.getAbsolutePath () + "'");
    }
    else
    {
      if (!isSilentMode ())
        if (LOGGER.isInfoEnabled ())
          LOGGER.info ("Deleted successfully imported WAL file '" + aWALFile.getAbsolutePath () + "'");
    }
  }
840557
public void methodErrorHook(String hookedClassQualifiedName,
            String hookedMethodSimpleName, Throwable e) {
        if (currentRunResult == null) {
            return; // maybe called outside of the root method
        }
        TestMethod rootMethod = currentRunResult.getRootMethod();
        if (!rootMethod.getTestClassKey().equals(hookedClassQualifiedName)
                || !rootMethod.getSimpleName().equals(hookedMethodSimpleName)) {
            return; // hooked method is not current root method
        }

        RunFailure runFailure = new RunFailure();
        runFailure.setMessage(e.getClass().getCanonicalName() + ": " + e.getLocalizedMessage());
        runFailure.setStackTrace(ExceptionUtils.getStackTrace(e));
        LineReplacer replacer = new LineReplacer() {

            @Override
            public void replace(String classQualifiedName, String methodSimpleName, int line) {
                super.replace(classQualifiedName, methodSimpleName, line);
                if (StringUtils.equals(methodSimpleName, currentActualRootMethodSimpleName)) {
                    replaceMethodSimpleName(currentRunResult.getRootMethod().getSimpleName());
                }
            }
        };
        List<StackLine> stackLines = StackLineUtils.getStackLines(srcTree, e.getStackTrace(), replacer);
        for (StackLine stackLine : stackLines) {
            runFailure.addStackLine(stackLine);
        }
        currentRunResult.addRunFailure(runFailure);

        captureScreenForStackLines(rootMethod, Arrays.asList(stackLines), Arrays.asList(-1));
    }
598918
public void openPageOrWarn(String link, String target) {

        openPageOrWarn(link, target, CmsVaadinUtils.getMessageText(org.opencms.ui.Messages.GUI_POPUP_BLOCKED_0));
    }
1076901
private void notifyUIRefreshComplete(boolean ignoreHook) {
        /**
         * After hook operation is done, {@link #notifyUIRefreshComplete} will be call in resume action to ignore hook.
         */
        if (mPtrIndicator.hasLeftStartPosition() && !ignoreHook && mRefreshCompleteHook != null) {
            if (DEBUG) {
                PtrCLog.d(LOG_TAG, "notifyUIRefreshComplete mRefreshCompleteHook run.");
            }

            mRefreshCompleteHook.takeOver();
            return;
        }
        if (mPtrUIHandlerHolder.hasHandler()) {
            if (DEBUG) {
                PtrCLog.i(LOG_TAG, "PtrUIHandler: onUIRefreshComplete");
            }
            mPtrUIHandlerHolder.onUIRefreshComplete(this);
        }
        mPtrIndicator.onUIRefreshComplete();
        tryScrollBackToTopAfterComplete();
        tryToNotifyReset();
    }
630926
@Override
    public void visitTryCatchBlock(Label start, Label end, Label handler, String exceptionType) {
        if (enabled && exceptionType != null) {
            handlers.put(handler, Type.getObjectType(exceptionType));
        }
        super.visitTryCatchBlock(start, end, handler, exceptionType);
    }
1161784
private void updateTargetDescription() {
		if( targetPt != null ) {
			TupleDesc feature = describe.createDescription();
			describe.process(targetPt.x,targetPt.y,targetOrientation,targetRadius,feature);
			tuplePanel.setDescription(feature);
		} else {
			tuplePanel.setDescription(null);
		}
		tuplePanel.repaint();
	}
1078795
@Override
    public void processAckExpected(long stamp)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "processAckExpected", new Object[] { Long.valueOf(stamp) });

        List nackList = null;
        List msgList = null;
        boolean processNack = true;

        // Take lock on target stream and hold it until messages have been
        // added to batch by deliverOrderedMessages 
        synchronized (this)
        {
            synchronized (oststream) //see defect 289889
            {
                long completedPrefix = oststream.getCompletedPrefix();
                long blockingTick = -1;
                // Send Ack message for ticks up to completedPrefix
                sendAck();
                if (isStreamBlocked())
                {
                    // If the link was implicitly blocked due to an 'unexpected' problem when we tried
                    // to deliver a message (the most obvious reason is due to not being authorized)
                    // we can't keep the stream blocked as we need to allow messages in again to re-try
                    // the deliverery of the message to be able to tell if the problem still exists.
                    // However, rather than nack all messages currently blocked on the stream (which is
                    // what the source end will be ack-expecting) we only nack the blocking message,
                    // if that succeeds the stream will be left un-blocked, but if it fails the stream
                    // will be re-locked. If the stream is left un-blocked, the next time an ack-expected
                    // comes in we'll nack everything.
                    if (isStreamBlockedUnexpectedly())
                    {
                        stamp = linkBlockingTick;
                        blockingTick = linkBlockingTick;

                        // We need to unblock the stream, otherwise the failing message won't be re-delivered
                        // when it arrives (it'll get bounced in writeValue), and that's the only way to tell
                        // is the failure is still valid (as it's not detected by streamCanAcceptNewMessage).
                        setStreamIsBlocked(false, DestinationHandler.OUTPUT_HANDLER_FOUND, null, null);
                    }
                    else
                    {
                        // The stream has been marked as blocked. We should only send 
                        // NACKs if we are able to accept the resent message once it arrives.
                        // Because ACKs are for the stream as a whole, if this is a link
                        // then we need to check whether the link's exception destination is
                        // able to accept messages. If no exception destination is defined on the
                        // link then we check the link blocking destination.
                        int blockingReason = deliverer.checkStillBlocked();
                        if (blockingReason == DestinationHandler.OUTPUT_HANDLER_FOUND)
                        {
                            //the destination is no longer blocked
                            setStreamIsBlocked(false, DestinationHandler.OUTPUT_HANDLER_FOUND, null, null);
                        }
                        else
                        {
                            // Its possible that the reason for the blockage has changed. This code allows
                            // the link health state to be altered to reflect that change (but keeps the
                            // same blocking tick as that hasn't changed)
                            setStreamIsBlocked(true, blockingReason, null, streamBlockingAddress);

                            // It's possible that the blockage has been cleared on the sending side without
                            // us knowing about it (e.g. the offending message was deleted but the silence never
                            // made it to us). So, to err on the side of caution, we occasionally forget about
                            // the blockage and allow the blocking tick to be nack'd (just that one, not all
                            // of them, we don't want them all to be re-sent until we know the problem doesn't
                            // still exist). This will either cause the same problematic message to be re-sent
                            // and the link will stay blocked or a silence will arrive indicating the blockage
                            // has been cleared, allowing the subsequent ackExcepted to result in a full Nack
                            if (blockingCount++ > 3)
                            {
                                stamp = linkBlockingTick;
                                blockingCount = 0;
                                blockingTick = linkBlockingTick;

                                // Note: In this case (unlike the unexpected block case above) we can leave the
                                // stream blocked as the original problem was detected by streamCanAcceptNewMessage,
                                // if the mesasge is re-sent writeValue will have a chance of processing it if
                                // the call to streamCanAcceptNewMessage thinks the problem has been resolved.

                                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                                    SibTr.debug(tc, "Nacking the first tick (" + stamp + ") of a blocked link");
                            }
                            // The stream is blocked (for now) so we don't want the blocking message (and all
                            // the ones built up behind it) to be resent because we nack them!
                            else
                                processNack = false;
                        }
                    }
                }
                //We're allowed to send Nacks
                if (processNack)
                {
                    if (stamp <= completedPrefix)
                    {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                            SibTr.exit(tc, "processAckExpected");
                        return;
                    }

                    // walk the oststream from the completedPrefix to endstamp and Nack
                    // everything that is Unknown or Requested
                    // Change everything which is Unknown to Requested.
                    nackList = new ArrayList();
                    long startstamp = completedPrefix + 1;
                    long endstamp = stamp;
                    oststream.setCursor(startstamp);
                    TickRange tr2 = null;
                    TickRange tr1 = oststream.getNext();
                    do
                    {
                        if ((tr1.type == TickRange.Unknown)
                            || (tr1.type == TickRange.Requested))
                        {
                            long ss, es;

                            // Handle case where start or endstamps fall within a range
                            ss = tr1.startstamp > startstamp ? tr1.startstamp : startstamp;
                            es = endstamp > tr1.endstamp ? tr1.endstamp : endstamp;

                            TickRange tr = new TickRange(TickRange.Requested, ss, es);

                            // Only need to update stream if this is currently Unknown
                            if (tr1.type == TickRange.Unknown)
                            {
                                oststream.writeRange(tr);
                            }

                            // SIB0105
                            // Set the head msg health state to AMBER if neccessary
                            synchronized (pendingAlarms)
                            {
                                // If we have no current gaps then we must be missing msg at the head of the stream
                                if (!getAlarms(this).hasNext())
                                {
                                    getControlAdapter().getHealthState().updateHealth(HealthStateListener.MSG_LOST_ERROR_STATE,
                                                                                      HealthState.AMBER);
                                    lastNackTick = endstamp;
                                }
                            }

                            nackList.add(tr);
                        }
                        // If the stream is blocked but we want to force the message (or a silence if it's
                        // been deleted on the source side) to be sent again then we need to add the blocking
                        // range to the nack list, even if it's in value state (which is possible if we tried
                        // to deliver it before but failed (so it's already added to the stream, but not
                        // delivered yet).
                        else if ((tr1.type == TickRange.Value) && (tr1.endstamp == blockingTick))
                        {
                            nackList.add(tr1);
                        }
                        tr2 = tr1;
                        tr1 = oststream.getNext();
                    } while ((tr1.startstamp <= endstamp) && (tr1 != tr2));
                }//end processNack
                else
                {
                    //we did not process the AckExpected message for any nacks
                    //as we did not have room for the replies
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                        SibTr.debug(tc, "did not process AckExpected message for nacks.");

                }

                // PK57736 We should should this stimulus from the sending side
                // to advance the doubt horizon, as it is possible they are not
                // sending messages any longer (which is the other stimulus).
                msgList = advanceDoubtHorizon(null);

            } // end synchronized

            // PK57736 Deliver messages outside of synchronise 
            // We do this because deliverOrderedMessages takes the 
            // BatchHandler lock and the BatchHandler callbacks require
            // the stream lock to update the completedPrefix. If we call
            // the BatchHandler when we hold the stream lock it could cause
            // a deadlock
            if (msgList != null)
            {
                // Call the Input or Output Handler to deliver the messages
                try
                {
                    deliverer.deliverOrderedMessages(msgList, this, priority, reliability);
                } catch (SINotPossibleInCurrentConfigurationException e)
                {
                    // No FFDC code needed
                    SibTr.exception(tc, e);

                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                        SibTr.debug(tc, "processAckExpected", "GDException");

                    // Dont rethrow the exception. The GD protocols will handle the resend of
                    // the message
                } catch (SIException e)
                {
                    // FFDC
                    FFDCFilter.processException(
                                                e,
                                                "com.ibm.ws.sib.processor.gd.GuaranteedTargetStream.processAckExpected",
                                                "1:1201:1.110",
                                                this);

                    SibTr.exception(tc, e);
                    SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                new Object[] {
                                              "com.ibm.ws.sib.processor.gd.GuaranteedTargetStream",
                                              "1:1208:1.110",
                                              e });

                    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                        SibTr.exit(tc, "processAckExpected", "GDException");

                    throw new SIErrorException(
                                    nls.getFormattedMessage(
                                                            "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                                            new Object[] {
                                                                          "com.ibm.ws.sib.processor.gd.GuaranteedTargetStream",
                                                                          "1:1218:1.110",
                                                                          e },
                                                            null),
                                    e);
                }
            }
        } // end sync - release lock on target stream

        // send nacks
        for (int j = 0; processNack && j < nackList.size(); j++)
        {
            TickRange temptr = (TickRange) nackList.get(j);

            try
            {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(tc, "processAckExpected sending Nack from: " + temptr.startstamp + " to " + temptr.endstamp);

                upControl.sendNackMessage(
                                          streamSet.getRemoteMEUuid(),
                                          streamSet.getDestUuid(),
                                          streamSet.getBusUuid(),
                                          temptr.startstamp,
                                          temptr.endstamp,
                                          priority,
                                          reliability,
                                          streamSet.getStreamID());
            } catch (SIResourceException e)
            {
                // FFDC
                FFDCFilter.processException(
                                            e,
                                            "com.ibm.ws.sib.processor.gd.GuaranteedTargetStream.processAckExpected",
                                            "1:1252:1.110",
                                            this);

                SibTr.exception(tc, e);
                SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                            new Object[] {
                                          "com.ibm.ws.sib.processor.gd.GuaranteedTargetStream",
                                          "1:1259:1.110",
                                          e });

                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    SibTr.exit(tc, "processAckExpected", e);

                throw new SIErrorException(
                                nls.getFormattedMessage(
                                                        "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                                        new Object[] {
                                                                      "com.ibm.ws.sib.processor.gd.GuaranteedTargetStream",
                                                                      "1:1270:1.110",
                                                                      e },
                                                        null),
                                e);
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "processAckExpected");
    }
628699
public void fireTableRowSelected(Object source, int iRowIndex, int iSelectionType)
    {
        this.fireMySelectionChanged(new MyListSelectionEvent(source, this, iRowIndex, iSelectionType));
    }
929736
public final void listenInline(Listener<T> onready, ISynchronizationPoint<TError> onErrorAndCancel) {
		listenInline(new AsyncWorkListener<T,TError>() {
			@Override
			public void ready(T result) {
				onready.fire(result);
			}
			
			@Override
			public void error(TError error) {
				onErrorAndCancel.error(error);
			}
			
			@Override
			public void cancelled(CancelException event) {
				onErrorAndCancel.cancel(event);
			}
			
			@Override
			public String toString() {
				return "AsyncWork.listenInline: " + onready;
			}
		});
	}
1155698
@Override
    public void sendFlushedMessage(SIBUuid8 ignore, SIBUuid12 streamID) throws SIResourceException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "sendFlushedMessage", new Object[] { streamID });

        // This flush should be broadcast to all downstream neighbors 
        // for this cell as it is the result of a startFlush()

        // This is a bit of a kludge since we may be sending flushes to cells
        // which have no information about a stream.
        HashMap allPubSubOutputHandlers = _destination.getAllPubSubOutputHandlers();
        try
        {
            Iterator itr = allPubSubOutputHandlers.values().iterator();

            while (itr.hasNext())
            {
                // Get the appropriate target cellule and forward the message
                PubSubOutputHandler handler = (PubSubOutputHandler) itr.next();

                // Note that the null Cellule we pass in here is ignored
                // as each OutputHandler knows its targetCellule 
                handler.sendFlushedMessage(null, streamID);

                // Also, tell the handler to remove any information for this
                // stream since it's just been flushed.
                handler.removeStream(streamID);
            }
        } finally
        {
            // By calling the getAllPubSubOutputHandlers it will lock the 
            // handlers
            _destination.unlockPubsubOutputHandlers();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "sendFlushedMessage");
    }
1245144
public void onTrace(@NonNull View targetView, @NonNull BaseCell cell, int type) {
        if (optimizedMode) {
            defaultTrace(targetView, cell, type);
        } else {
            if (mOnExposureMethods.isEmpty() || mOnTraceMethods.isEmpty()) {
                Method[] methods = this.getClass().getMethods();
                findTraceMethods(methods);
                findExposureMethods(methods);
            }
            List<Class<?>> classes = lookupCellTypes(targetView.getClass());
            for (Class clz : classes) {
                if (clz.equals(View.class)){
                    continue;
                }
                if (mOnTraceMethods.containsKey(clz)) {
                    OnTraceMethod onTraceMethod = mOnTraceMethods.get(clz);
                    try {
                        if (onTraceMethod.paramLength == 3) {
                            onTraceMethod.method.invoke(this, targetView, cell, type);
                            return;
                        }
                    } catch (Exception e) {
                        LogUtils.e(TAG, "Invoke Trace method error: " + Log.getStackTraceString(e),
                                e);
                    }
                }
            }
            defaultTrace(targetView, cell, type);
        }
    }
1216386
public static void setFileHandler(Object target, Method fileHandler) {
        setHandler(new OSXAdapter("handleOpenFile", target, fileHandler) {
            // Override OSXAdapter.callTarget to send information on the
            // file to be opened
            public boolean callTarget(Object appleEvent) {
                if (appleEvent != null) {
                    try {
                        Method getFilenameMethod = appleEvent.getClass().getDeclaredMethod("getFilename", (Class[])null);
                        String filename = (String) getFilenameMethod.invoke(appleEvent, (Object[])null);
                        this.targetMethod.invoke(this.targetObject, new Object[] { filename });
                    } catch (Exception ex) {
                        
                    }
                }
                return true;
            }
        });
    }
468769
@Override
    public OutputHandler getLocalPostMedPtoPOH(boolean localMessage,
                                               boolean forcePut,
                                               boolean singleServer)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc,
                        "getLocalPostMedPtoPOH",
                        new Object[] { new Boolean(localMessage),
                                      new Boolean(forcePut),
                                      new Boolean(singleServer) });

        // Return null for pubsub
        OutputHandler result = null;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getLocalPostMedPtoPOH", result);

        return result;
    }