/* (non-Javadoc)
@see com.ibm.ws.sib.processor.runtime.SIMPMessageProcessorControllable#resetMessageHandlerByName()
330657
public void resetDestination(String destName)
    throws SIMPRuntimeOperationFailedException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "resetMessageHandler", destName);
    
    try
    {  
      destinationManager.resetDestination(destName);
    }
    catch (Exception e)
    {
      // No FFDC code needed.
      throw new SIMPRuntimeOperationFailedException(e);
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "resetMessageHandler");
  }
1316563
@Override
    public void setName(final String name) {
        for (final IAdditionalDescriptors additionalDescriptors : delegateDescriptors) {
            additionalDescriptors.setName(name);
        }
    }
558579
@Override
    public void handleMessage(Message message) throws Fault {

        //ignore the messages from SAM Server service itself
        BindingOperationInfo boi = message.getExchange().getBindingOperationInfo();
        if (null != boi){
            String operationName = boi.getName().toString();
            if (SAM_OPERATION.equals(operationName)) {
                return;
            }
        }

        if (isRestWadlRequest(message)) {
            // skip handling REST service WADL requests - temporary fix since will be fixed in CXF soon
            return;
        }

        if (isOnewayResponse(message)) {
            // skip oneway response events
            return;
        }

        // Skip Swagger UI web static, swagger.json and swagger.yaml requests
        if (isSwaggerResourceRequest(message)) {
            return;
        }

        //check MessageID
        checkMessageID(message);

        Event event = mapper.mapToEvent(message);

        if (LOG.isLoggable(Level.FINE)) {
            String id = (event.getMessageInfo() != null) ? event.getMessageInfo().getMessageId() : null;
            LOG.fine("Store event [message_id=" + id + "] in cache.");
        }
        if (null != event) {
            queue.add(event);
        }

        // TESB-20624 skip duplicated event processing
        message.getInterceptorChain().remove(this);
    }
950278
public static MessageHandler reflectionInvokedHandler(final Class<?> messageType, final Method methodToInvoke, final boolean startsSaga) {
        return new MessageHandler(messageType, methodToInvoke, startsSaga);
    }
882374
@Override
    public final void setName(String name) {
        log.debug("Set name: {}", name);
        if (this.name == null && StringUtils.isNotBlank(name)) {
            // reset of the name is no longer allowed
            this.name = name;
            // unregister from jmx
            if (oName != null) {
                unregisterJMX();
            }
            // register
            registerJMX();
        } else {
            log.info("Scope {} name reset to: {} disallowed", this.name, name);
        }
    }
651273
public void setName(String name) throws IOException {
    if (failException != null) {
      throw failException;
    }

    if (name == null || name.length() == 0) {
      return;
    }

    sessionInfo.name = name;

    SessionInfo newInfo = new SessionInfo(sessionInfo);
    cmNotifier.addCall(
      new ClusterManagerService.sessionUpdateInfo_args(sessionId, newInfo));
  }
1351850
public void setProcessName(java.util.Collection<StringFilter> processName) {
        if (processName == null) {
            this.processName = null;
            return;
        }

        this.processName = new java.util.ArrayList<StringFilter>(processName);
    }
405720
public static MessageHandler signallingMessageHandler(final ProcessEngine processEngine) {
        return new MessageHandler() {
            @Override
            public void handleMessage(Message<?> message) throws MessagingException {
                String executionId = message.getHeaders().containsKey("executionId") ?
                        (String) message.getHeaders().get("executionId") : (String) null;

                if (null != executionId)
                    processEngine.getRuntimeService().trigger(executionId);
            }
        };
    }
42933
public void handleControlMessage(SIBUuid8 sourceMEUuid, ControlMessage cMsg)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "handleControlMessage", new Object[]{sourceMEUuid, cMsg});
      
    InvalidOperationException e = new InvalidOperationException(
        nls.getFormattedMessage(
          "INTERNAL_MESSAGING_ERROR_CWSIP0001",
          new Object[] {
            "com.ibm.ws.sib.processor.impl.DurableInputHandler",
            "1:183:1.52.1.1" },
          null));
    
    // FFDC
    FFDCFilter.processException(
      e,
      "com.ibm.ws.sib.processor.impl.DurableInputHandler.handleControlMessage",
      "1:190:1.52.1.1",
      this);
      
    SibTr.exception(tc, e);
    SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0001",
      new Object[] {
        "com.ibm.ws.sib.processor.impl.DurableInputHandler",
        "1:197:1.52.1.1" });
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "handleControlMessage", e);
    throw e;
  }
273108
public void setErrorMessage(String msg) {
        if (msg != null && msg.trim().length() > 0) {
            errorMessage = msg;
        }
    }
980351
protected void cleanup() {

        final String methodName = "cleanup";
        if (TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName);
        }

        super.cleanup();

        if (_successfulMessages.size() > 0) {

            try {

                deleteMessages(getMessageHandles(_successfulMessages), null);

            } catch (final ResourceException exception) {

                FFDCFilter.processException(exception, CLASS_NAME + "."
                        + methodName, FFDC_PROBE_1, this);
                if (TRACE.isEventEnabled()) {
                    SibTr.exception(this, TRACE, exception);
                }

            } finally {

                _successfulMessages.clear();

            }

        }

        if (TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }
67725
@Override
	public Message<?> beforeHandle(Message<?> message, MessageChannel channel,
			MessageHandler handler) {
		if (emptyMessage(message)) {
			return message;
		}
		MessageHeaderAccessor headers = mutableHeaderAccessor(message);
		TraceContextOrSamplingFlags extracted = this.extractor.extract(headers);
		// Start and finish a consumer span as we will immediately process it.
		Span consumerSpan = this.tracer.nextSpan(extracted);
		if (!consumerSpan.isNoop()) {
			consumerSpan.kind(Span.Kind.CONSUMER).start();
			consumerSpan.remoteServiceName(REMOTE_SERVICE_NAME);
			addTags(message, consumerSpan, channel);
			consumerSpan.finish();
		}
		// create and scope a span for the message processor
		this.threadLocalSpan
				.next(TraceContextOrSamplingFlags.create(consumerSpan.context()))
				.name("handle").start();
		// remove any trace headers, but don't re-inject as we are synchronously
		// processing the
		// message and can rely on scoping to access this span later.
		MessageHeaderPropagation.removeAnyTraceHeaders(headers,
				this.tracing.propagation().keys());
		if (log.isDebugEnabled()) {
			log.debug("Created a new span in before handle" + consumerSpan);
		}
		if (message instanceof ErrorMessage) {
			return new ErrorMessage((Throwable) message.getPayload(),
					headers.getMessageHeaders());
		}
		headers.setImmutable();
		return new GenericMessage<>(message.getPayload(), headers.getMessageHeaders());
	}
84810
public void resetLink(String linkName)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "resetLink", linkName);

        try
        {
            DestinationHandler link = linkIndex.findByName(linkName, null);

            checkDestinationHandlerExists(
                                          link != null,
                                          linkName,
                                          messageProcessor.getMessagingEngineBus());

            // Only applicable to BaseDestinationHandlers and their children
            if (link instanceof LinkHandler)
            {
                LinkHandler linkhandler = (LinkHandler) link;

                // Need to ensure that this change is persisted - specifically that the
                // BDH "toBeIgnored" flag is persisted
                LocalTransaction siTran = txManager.createLocalTransaction(true);

                linkhandler.reset();

                // Change our entry in the appropriate index.
                linkIndex.reset(link);

                // Persist the change
                linkhandler.requestUpdate((Transaction) siTran);

                // commit the transaction
                siTran.commit();

                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(tc, "Have reset link " + linkhandler.getName());
            }
            else
            {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(tc, "Not a LinkHandler, cannot reset handler for " + link.getName());
            }
        } catch (MessageStoreException e)
        {
            // No FFDC code needed

            SibTr.exception(tc, e);

            //throw e;
        } catch (SIException e)
        {
            // No FFDC code needed

            SibTr.exception(tc, e);

            //handleRollback(siTran);
            //        throw e;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "resetLink");
    }
94069
@Override
    public void messagingEngineDestroyed(JsMessagingEngine messagingEngine)
    {
        final String methodName = "messagingEngineDestroyed";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.entry(this, TRACE, methodName, messagingEngine);
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.exit(this, TRACE, methodName);
        }
    }
952426
def ResetHandler(self, name):
        '''
        
        '''
        if name in self.tags:
            if len(self.tags) > 1:
                key = len(self.tags) - 2
                self.handler = None
                while key >= 0:
                    if self.tags[key] in self.structure:
                        self.handler = self.structure[self.tags[key]]
                        break
                    key -= 1

            else:
                self.handler = None
848808
protected void resetCallbackCursor() throws SIResourceException, SISessionDroppedException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "resetCallbackCursor", new Integer(hashCode()));

    synchronized(this)
    {
      unlockAllUnread();

      callbackEntryMsg = lastMsg;
      currentMsg = lastMsg;
      messageAvailable = false;
      endReached = false;
      validState = false;
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "resetCallbackCursor", this);
  }
1107455
SubscriptionMessageHandler getMessageHandler()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getMessageHandler");

    SubscriptionMessageHandler messageHandler =
      (SubscriptionMessageHandler) _subscriptionMessagePool.remove();

    if (messageHandler == null)
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        SibTr.debug(
          tc,
          "doProxySubscribeOp",
          "Creating a new Message Handler as none available");

      messageHandler = new SubscriptionMessageHandler(this);
    }

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

    return messageHandler;
  }