Post process message converter.
@param context
517122
protected void configureMessageConverter(ApplicationContext context) {
        if (context.containsBean(MESSAGE_CONVERTER_BEAN_NAME)) {
            HttpMessageConverter messageConverter = context.getBean(MESSAGE_CONVERTER_BEAN_NAME, HttpMessageConverter.class);

            if (messageConverter instanceof DelegatingHttpEntityMessageConverter) {
                ((DelegatingHttpEntityMessageConverter) messageConverter).setBinaryMediaTypes(httpServer.getBinaryMediaTypes());
            }
        }
    }
1219964
public static void setupMessageBundle(Context context) {
    ResourceBundle bundle = ResourceBundle.getBundle("com.google.errorprone.errors");
    JavacMessages.instance(context).add(l -> bundle);
  }
173714
public void processThisMessage()
    {
        Utility.getLogger().info("On message called in receiving process");
        try {
            BaseMessage messageIn = this.getMessage();
            if (messageIn != null)
            {
                BaseMessage messageReply = this.createReplyMessage(messageIn);
                this.moveScreenParamsToMessage(messageReply);
                // Step 2 - Get the body part of the message
                this.getTransport().setupReplyMessage(messageReply, messageIn, MessageInfoTypeModel.REPLY, MessageTypeModel.MESSAGE_IN);
            
                this.getTransport().processIncomingMessage(messageReply, null);
            }
        } catch(Exception ex) {
            ex.printStackTrace();
            Debug.print(ex, "Error in processing or replying to a message");
        }
    }
659562
protected void hookPreparedMessage(Postcard postcard, final SMailPostingMessage message) {
        if (SMailCallbackContext.isExistPreparedMessageHookOnThread()) {
            final SMailCallbackContext context = SMailCallbackContext.getCallbackContextOnThread();
            final SMailPreparedMessageHook hook = context.getPreparedMessageHook();
            hook.hookPreparedMessage(postcard, message);
        }
    }
852304
private void processDefaultBody(ParserContext context) {
        StringBuilder body = new StringBuilder();
        boolean inBody = false;
        for (String line : context.getFileLines()) {
            if (inBody) {
                body.append(line).append("\n");
            }
            if (line.equals(configuration.getHeaderSeparator())) {
                inBody = true;
            }
        }

        if (body.length() == 0) {
            for (String line : context.getFileLines()) {
                body.append(line).append("\n");
            }
        }
        context.setBody(body.toString());
    }
276527
@Override
	public Message<?> postReceive(Message<?> message, MessageChannel channel) {
		if (emptyMessage(message)) {
			return message;
		}
		MessageHeaderAccessor headers = mutableHeaderAccessor(message);
		TraceContextOrSamplingFlags extracted = this.extractor.extract(headers);
		Span span = this.threadLocalSpan.next(extracted);
		MessageHeaderPropagation.removeAnyTraceHeaders(headers,
				this.tracing.propagation().keys());
		this.injector.inject(span.context(), headers);
		if (!span.isNoop()) {
			span.kind(Span.Kind.CONSUMER).name("receive").start();
			span.remoteServiceName(REMOTE_SERVICE_NAME);
			addTags(message, span, channel);
		}
		if (log.isDebugEnabled()) {
			log.debug("Created a new span in post receive " + span);
		}
		headers.setImmutable();
		if (message instanceof ErrorMessage) {
			ErrorMessage errorMessage = (ErrorMessage) message;
			return new ErrorMessage(errorMessage.getPayload(),
					headers.getMessageHeaders(), errorMessage.getOriginalMessage());
		}
		return new GenericMessage<>(message.getPayload(), headers.getMessageHeaders());
	}
595854
protected void sendEvent(T event, Object receiver, CreationalContext<?> creationalContext) {
        try {
            preNotify(event, receiver);
            // As we are working with the contextual instance, we may not have the
            // actual object, but a container proxy (e.g. EJB)
            notificationStrategy.invoke(receiver, observerMethod, event, beanManager, creationalContext);
        } finally {
            postNotify(event, receiver);
        }
    }
601487
public BaseMessage convertToThinMessage()
    {
        int iChangeType = ((RecordMessageHeader)this.getMessageHeader()).getRecordMessageType();
        // See if this record is currently displayed or buffered, if so, refresh and display.

        Object data = this.getData();
        BaseMessage messageTableUpdate = null;
        // NOTE: The only way I will send this message to the client is if the ModelMessageHandler.START_INDEX_PARAM has been added to this message by the TableSession
//        if (properties.get(ModelMessageHandler.START_INDEX_PARAM) != null)
        {
            BaseMessageHeader messageHeader = new SessionMessageHeader(this.getMessageHeader().getQueueName(), this.getMessageHeader().getQueueType(), null, this);
            messageTableUpdate = new MapMessage(messageHeader, data);
            messageTableUpdate.put(MessageConstants.MESSAGE_TYPE_PARAM, Integer.toString(iChangeType));
        }
        return messageTableUpdate;
    }
284018
public int convertToExternal(BaseMessage messageOut, BaseInternalMessageProcessor messageOutProcessor)
    {
        String strMessageInfoType = MessageInfoTypeModel.REQUEST;
        String strMessageProcessType = MessageTypeModel.MESSAGE_OUT;
        if (messageOut.getMessageHeader() != null)
        {
            strMessageInfoType = (String)messageOut.getMessageHeader().get(TrxMessageHeader.MESSAGE_INFO_TYPE);
            strMessageProcessType = (String)messageOut.getMessageHeader().get(TrxMessageHeader.MESSAGE_PROCESS_TYPE);
        }
        if (messageOutProcessor == null)
        {
            String strDefaultProcessorClass = MessageTypeModel.MESSAGE_OUT.equals(strMessageProcessType) ? BaseMessageOutProcessor.class.getName() : BaseMessageReplyOutProcessor.class.getName();
            messageOutProcessor = (BaseInternalMessageProcessor)BaseMessageProcessor.getMessageProcessor(this.getTask(), messageOut, strDefaultProcessorClass);
        }
        messageOut.createMessageDataDesc();
        messageOutProcessor.processMessage(messageOut);
        String strMessageStatus = MessageTypeModel.MESSAGE_OUT.equals(strMessageProcessType) ? MessageStatusModel.SENT : MessageStatusModel.SENTOK;   // Reply does not wait for a reply
        ExternalMessage externalTrxMessage = this.createExternalMessage(messageOut, null);
        Utility.getLogger().info("sendMessage  externalTrxMessage = " + externalTrxMessage);
        String strTrxID = this.logMessage(null, messageOut, strMessageInfoType, strMessageProcessType, strMessageStatus, null, null);
        if (messageOut.getMessageHeader() instanceof TrxMessageHeader)
            ((TrxMessageHeader)messageOut.getMessageHeader()).put(TrxMessageHeader.LOG_TRX_ID, strTrxID);
        int iErrorCode = DBConstants.ERROR_RETURN;
        if (externalTrxMessage != null)
            iErrorCode = externalTrxMessage.convertInternalToExternal(this);    // Convert my standard message to the OTA EC message
        String strMessageDescription = null;
        if (iErrorCode != DBConstants.NORMAL_RETURN)
        {
            strMessageDescription = this.getTask().getLastError(iErrorCode);
            if ((strMessageDescription == null) || (strMessageDescription.length() == 0))
                strMessageDescription = "Error converting to external format";
            iErrorCode = this.getTask().setLastError(strMessageDescription);
            strMessageStatus = MessageStatusModel.ERROR;
        }
        this.logMessage(strTrxID, messageOut, strMessageInfoType, strMessageProcessType, strMessageStatus, strMessageDescription, null); // Log it with the external info
        return iErrorCode;
    }
623075
private Component applyPostProcessors(Component in, Context context, Arguments args)
    {
        Component out = in;

        for (final PostProcessor postProcessor : postProcessors)
        {
            out = postProcessor.process(out, context, args);
        }

        return out;
    }
261894
protected void afterSend(RpcInternalContext context, SofaRequest request) {
        currentRequests.decrementAndGet();
        int cost = context.getStopWatch().tick().read();
        context.setAttachment(RpcConstants.INTERNAL_KEY_REQ_SERIALIZE_TIME, cost);
        if (EventBus.isEnable(ClientAfterSendEvent.class)) {
            EventBus.post(new ClientAfterSendEvent(request));
        }
    }
41696
protected static void addMessageDescriptorToMessageContext(final MessageContext context, final MessageDescriptor warning) {
        val builder = new MessageBuilder()
            .warning()
            .code(warning.getCode())
            .defaultText(warning.getDefaultMessage())
            .args((Object[]) warning.getParams());
        context.addMessage(builder.build());
    }
955421
protected void postProcessApplicationContext(ConfigurableApplicationContext context) {
		if (this.beanNameGenerator != null) {
			context.getBeanFactory().registerSingleton(
					AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR,
					this.beanNameGenerator);
		}
		if (this.resourceLoader != null) {
			if (context instanceof GenericApplicationContext) {
				((GenericApplicationContext) context)
						.setResourceLoader(this.resourceLoader);
			}
			if (context instanceof DefaultResourceLoader) {
				((DefaultResourceLoader) context)
						.setClassLoader(this.resourceLoader.getClassLoader());
			}
		}
		if (this.addConversionService) {
			context.getBeanFactory().setConversionService(
					ApplicationConversionService.getSharedInstance());
		}
	}
636039
public void exportContext() {
		ContextExportDialog exportDialog = new ContextExportDialog(View.getSingleton().getMainFrame());
		exportDialog.setVisible(true);
	}
530271
@Override
    public void onReceive(Context context, Intent intent) {
        String messageId = intent.getStringExtra(ID);
        MFPPush.getInstance().changeStatus(messageId, MFPPushNotificationStatus.DISMISSED);
    }
65469
public void contextChange(int typeOfChange) throws IllegalStateException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            String type = "UNKNOWN";
            switch (typeOfChange)
            {
            case UOWCallback.PRE_BEGIN:
                type = "PRE_BEGIN";
                break;
            case UOWCallback.POST_BEGIN:
                type = "POST_BEGIN";
                break;
            case UOWCallback.PRE_END:
                type = "PRE_END";
                break;
            case UOWCallback.POST_END:
                type = "POST_END";
                break;
            }

            Tr.entry(tc, "contextChange", type);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "UOWCurrent", _uowCurrent);

        //
        // Need to get the current UOWCoordinator if 
        // we are in POST_BEGIN or PRE_END
        //
        UOWCoordinator coord = null;

        if ((typeOfChange == UOWCallback.POST_BEGIN) || (typeOfChange == UOWCallback.PRE_END))
        {
            coord = _uowCurrent.getUOWCoord();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "Coordinator="+coord);

        IllegalStateException ex = null;

        //
        // Inform the registered callbacks
        //
        for (int i = 0; i < _callbacks.size(); i++)
        {
            UOWCallback callback = _callbacks.get(i);

            try
            {
                callback.contextChange(typeOfChange, coord);
            }
            catch (IllegalStateException ise)
            {   
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "Exception caught during UOW callback at context change", ise);
                ex = ise;
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.exit(tc, "contextChange");

        //
        // If one of the callbacks threw an exception 
        // then rethrow here. In practice the last exception 
        // to be thrown will be re-thrown but as long as 
        // we throw it doesn't matter.
        //
        if (ex != null)
        {
            throw ex;
        }
    }
1298070
protected void processLegacyRequest(HyperionContext hyperionContext)
    {
        EndpointRequest request = hyperionContext.getEndpointRequest();
        EndpointResponse response = hyperionContext.getEndpointResponse();

        ApiVersionPlugin<ApiObject<Serializable>,PersistentObject<Serializable>,Serializable> apiVersionPlugin = hyperionContext.getVersionPlugin();
        EntityPlugin plugin = hyperionContext.getEntityPlugin();

        ApiObject clientObject = null;
        try
        {
            clientObject = marshaller.unmarshall(request.getInputStream(),apiVersionPlugin.getApiClass());
        }
        catch (MarshallingException e)
        {
            throw new BadRequestException(messageSource.getErrorMessage(ERROR_READING_REQUEST,hyperionContext.getLocale(),e.getMessage()),e);
        }
        clientObject.setId(null);

        PersistenceContext persistenceContext = buildPersistenceContext(hyperionContext);
        Set<String> fieldSet = persistenceContext.getRequestedFields();
        if(fieldSet != null)
            fieldSet.add("id");

        ApiObject saved = (ApiObject) plugin.getPersistenceOperations().createOrUpdateItems(
                Collections.singletonList(clientObject),
                persistenceContext).get(0);

        processChangeEvents(hyperionContext, persistenceContext);
        response.setResponseCode(200);
        hyperionContext.setResult(saved);
    }