Creates a map with an error message and this data point to return
to the HTTP put data point RPC handler
@param message The message to log
@return A map to append to the HTTP response
353249
protected final Map<String, Object> getHttpDetails(final String message) {
    final Map<String, Object> map = new HashMap<String, Object>();
    map.put("error", message);
    map.put("datapoint", this);
    return map;
  }
798354
@SuppressWarnings("unchecked")
    protected JsonObject bizError(String message) {
        JsonObject json = JsonObject.create();
        json.setMsg(Arrays.asList(message));
        json.addData(WebResponseConstant.MESSAGE_MSG, message);
        json.setStatus(GlobalResponseStatusMsg.BIZ_ERROR.getMessage().getCode());
        return json;
    }
183434
public void addMessageToCache(Message message) {
        messages.compute(message.getId(), (key, value) -> {
            if ((value == null) || (value.get() == null)) {
                WeakReference<Message> result = new WeakReference<>(message, messagesCleanupQueue);
                messageIdByRef.put(result, key);
                return result;
            }
            return value;
        });
    }
1211299
@SuppressWarnings("unchecked")
	public <T extends Message> Map<String, Object> writeMessage(final T message,
			final MessageDescriptor<T> descriptor) {
		try {
			return (Map<String, Object>) objectFormat.write(message, descriptor);
		} catch (Exception e) {
			throw propagate(e);
		}
	}
242471
@Override
    public MapMessage createMapMessage() throws JMSRuntimeException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createMapMessage");

        MapMessage mapMessage = null;

        try {
            mapMessage = jmsSession.createMapMessage();
        } catch (JMSException jmse) {
            throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "createMapMessage", new Object[] { mapMessage });
        }

        return mapMessage;

    }
45379
protected String getDetailedErrorMessage(String message) {
		StringBuilder sb = new StringBuilder(message).append("\n");
		sb.append("HandlerMethod details: \n");
		sb.append("Bean [").append(getBeanType().getName()).append("]\n");
		sb.append("Method [").append(getBridgedMethod().toGenericString()).append("]\n");
		return sb.toString();
	}
335140
public Collection<Exception> error(final Object message, final Throwable error) {
        return Lists.reverse(errorHandlers).stream()
                .flatMap(f -> f.apply(message, error).map(Stream::of).orElse(Stream.empty()))
                .collect(Collectors.toList());
    }
752457
private static Map<String, List<String>> getOrCreateProtocolHeader(
            Message message) {
        Map<String, List<String>> headers = CastUtils.cast((Map<?, ?>) message
                .get(Message.PROTOCOL_HEADERS));
        if (headers == null) {
            headers = new HashMap<String, List<String>>();
            message.put(Message.PROTOCOL_HEADERS, headers);
        }
        return headers;
    }
1123112
protected JsonObject paramError(String field, String message) {
        Map<String, Object> errors = new HashMap<String, Object>();
        errors.put(field, message);
        return paramError(errors);
    }
505131
public static Result failure(int code, String message, List<Error> errors) {
        return new Result(code, message, errors);
    }
212849
public static Map<String, Object> errorToMap(Throwable e) {
        Map<String, Object> m = new HashMap<String, Object>();
        m.put("requestId", MDC.get("requestId"));
        m.put("message", e.getMessage());
        m.put("errorClass", e.getClass().getName());
        return m;
    }
530353
@Override
    public Message newMessage(final Object message) {
        final ReusableObjectMessage result = getObject();
        result.set(message);
        return result;
    }
231851
@Override
	public Response checkMessagingConnectionForTheDm( String message ) {

		this.logger.fine( "Request: check the connection to the message queue. message=" + message );
		Response response;
		String lang = lang( this.manager );
		if( this.manager.debugMngr().pingMessageQueue( message ))
			response = handleError( Status.OK, new RestError( REST_DEBUG_AGENT_KO, name( "ECHO" ), value( message )), lang ).build();
		else
			response = handleError( Status.INTERNAL_SERVER_ERROR, new RestError( REST_MESSAGING_ERROR ), lang ).build();

		return response;
	}
533032
public Map<String, String> toMap() {
        Map<String, String> map = new HashMap<>();

        map.put("message", this.getMessage());
        map.put("success", this.getSuccess());
        map.put("is_ported", this.getIsPorted());
        map.put("provider", this.getProvider());
        map.put("type", this.getType());


        return map;
    }
760727
public void error(String message, Map<String, Object> custom) {
    log(null, custom, message, Level.ERROR);
  }
31678
public static <E> Response<E> failure(String message, String code) {
        return new Response<>(false, message, code);
    }
781412
public int sendMessage(Message message)
    {
        BaseMessageHeader messageHeader = ((BaseMessage)message).getMessageHeader();
        String strQueueType = messageHeader.getQueueType();
        String strQueueName = messageHeader.getQueueName();
        MessageSender sender = this.getMessageQueue(strQueueName, strQueueType).getMessageSender();
        if (sender != null)
            sender.sendMessage(message);
        else
            return Constant.ERROR_RETURN;  // Queue doesn't exist
        return Constant.NORMAL_RETURN;
    }