/** * Subclasses implement this method to process the received message. * * If subclasses would rather just receive the {@link BasicMessage}, it can do so by * overriding {@link #onBasicMessage(BasicMessage)} and leaving this method as-is (that is, * do NOT override this method). * * @param msgWithExtraData the basic message received with any extra data that came with it */ protected void onBasicMessage(BasicMessageWithExtraData<T> msgWithExtraData) { onBasicMessage(msgWithExtraData.getBasicMessage()); // delegate }
/** * Subclasses implement this method to process the received message. * * If subclasses would rather just receive the {@link BasicMessage}, it can do so by * overriding {@link #onBasicMessage(BasicMessage)} and leaving this method as-is (that is, * do NOT override this method). * * @param msgWithExtraData the basic message received with any extra data that came with it */ protected void onBasicMessage(BasicMessageWithExtraData<T> msgWithExtraData) { onBasicMessage(msgWithExtraData.getBasicMessage()); // delegate }
/** * Subclasses implement this method to process the received message. * * If subclasses would rather just receive the {@link AbstractMessage}, it can do so by * overriding the onBasicMessage method that just takes the message type as a parameter * and leaving this method as-is (that is, do NOT override this method). * * @param msgWithExtraData the basic message received with any extra data that came with it * @return the response message - this will be forwarded to the sender of the request message */ protected U onBasicMessage(BasicMessageWithExtraData<T> msgWithExtraData) { return onBasicMessage(msgWithExtraData.getBasicMessage()); }
/** * Subclasses implement this method to process the received message. * * If subclasses would rather just receive the {@link AbstractMessage}, it can do so by * overriding the onBasicMessage method that just takes the message type as a parameter * and leaving this method as-is (that is, do NOT override this method). * * @param msgWithExtraData the basic message received with any extra data that came with it * @return the response message - this will be forwarded to the sender of the request message */ protected U onBasicMessage(BasicMessageWithExtraData<T> msgWithExtraData) { return onBasicMessage(msgWithExtraData.getBasicMessage()); }
/** * If the given {@code message.getBinaryData()} is not {@code null} delegates to * {@link #sendWithBinaryData(ProducerConnectionContext, BasicMessage, InputStream, Map)} otherwise delegates to * {@link #send(ProducerConnectionContext, BasicMessageWithExtraData, Map)} * * @param context information that determines where the message is sent * @param message the message to send * @param headers headers for the JMS transport that will override same-named headers in the basic message * @return the message ID * @throws JMSException any error */ public <T extends BasicMessage> MessageId send(ProducerConnectionContext context, BasicMessageWithExtraData<T> message, Map<String, String> headers) throws JMSException { if (message.getBinaryData() == null) { return send(context, message.getBasicMessage(), headers); } else { return sendWithBinaryData(context, message.getBasicMessage(), message.getBinaryData(), headers); } }
/** * If the given {@code message.getBinaryData()} is not {@code null} delegates to * {@link #sendWithBinaryData(ProducerConnectionContext, BasicMessage, InputStream, Map)} otherwise delegates to * {@link #send(ProducerConnectionContext, BasicMessageWithExtraData, Map)} * * @param context information that determines where the message is sent * @param message the message to send * @param headers headers for the JMS transport that will override same-named headers in the basic message * @return the message ID * @throws JMSException any error */ public <T extends BasicMessage> MessageId send(ProducerConnectionContext context, BasicMessageWithExtraData<T> message, Map<String, String> headers) throws JMSException { if (message.getBinaryData() == null) { return send(context, message.getBasicMessage(), headers); } else { return sendWithBinaryData(context, message.getBasicMessage(), message.getBinaryData(), headers); } }
retVal.getBasicMessage().setMessageId(new MessageId(message.getJMSMessageID())); if (message.getJMSCorrelationID() != null) { MessageId correlationId = new MessageId(message.getJMSCorrelationID()); retVal.getBasicMessage().setCorrelationId(correlationId); retVal.getBasicMessage().setHeaders(rawHeaders); getLog().tracef("Received basic message: %s", retVal.getBasicMessage().getClass());
retVal.getBasicMessage().setMessageId(new MessageId(message.getJMSMessageID())); if (message.getJMSCorrelationID() != null) { MessageId correlationId = new MessageId(message.getJMSCorrelationID()); retVal.getBasicMessage().setCorrelationId(correlationId); retVal.getBasicMessage().setHeaders(rawHeaders); getLog().tracef("Received basic message: %s", retVal.getBasicMessage().getClass());
UpdateCollectionIntervalsRequest request = envelope.getBasicMessage(); Map<PathAddress, String> metricTypes = filterUpdates(mcc, request.getMetricTypes(), false, agentAddress); Map<PathAddress, String> availTypes = filterUpdates(mcc, request.getAvailTypes(), true, agentAddress);