javax.jms.Message.clearBody()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(176)

本文整理了Java中javax.jms.Message.clearBody()方法的一些代码示例,展示了Message.clearBody()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.clearBody()方法的具体详情如下:
包路径:javax.jms.Message
类名称:Message
方法名:clearBody

Message.clearBody介绍

[英]Clears out the message body. Clearing a message's body does not clear its header values or property entries.

If this message body was read-only, calling this method leaves the message body in the same state as an empty body in a newly created message.
[中]清除消息正文。清除消息正文并不清除其标题值或属性条目。
如果此消息正文是只读的,则调用此方法会使消息正文与新创建的消息中的空正文处于相同的状态。

代码示例

代码示例来源:origin: org.apache.tomee/openejb-core

@Override
public void clearBody() throws JMSException {
  message.clearBody();
}

代码示例来源:origin: org.jboss.jbossas/jboss-as-connector

public void clearBody() throws JMSException
{
 message.clearBody();
}

代码示例来源:origin: org.jboss.genericjms/generic-jms-ra-jar

public void clearBody() throws JMSException {
  message.clearBody();
}

代码示例来源:origin: org.apache.qpid/qpid-jca

/**
* Clear body
* @exception JMSException Thrown if an error occurs
*/
public void clearBody() throws JMSException
{
 if (_log.isTraceEnabled())
 {
   _log.trace("clearBody()");
 }
 _message.clearBody();
}

代码示例来源:origin: apache/activemq-artemis

/**
* Clear body
*
* @throws JMSException Thrown if an error occurs
*/
@Override
public void clearBody() throws JMSException {
 if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
   ActiveMQRALogger.LOGGER.trace("clearBody()");
 }
 message.clearBody();
}

代码示例来源:origin: org.apache.activemq/artemis-ra

/**
* Clear body
*
* @throws JMSException Thrown if an error occurs
*/
@Override
public void clearBody() throws JMSException {
 if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
   ActiveMQRALogger.LOGGER.trace("clearBody()");
 }
 message.clearBody();
}

代码示例来源:origin: org.ballerinalang/ballerina-jms

@Override
  public void execute(Context context, CallableUnitCallback callableUnitCallback) {

    Struct messageStruct = BallerinaAdapter.getReceiverObject(context);
    Message message = BallerinaAdapter.getNativeObject(messageStruct,
                              Constants.JMS_MESSAGE_OBJECT,
                              Message.class,
                              context);
    try {
      message.clearBody();
    } catch (JMSException e) {
      BallerinaAdapter.returnError("Error when clearing the message body", context, e);
    }
  }
}

相关文章