Examples of clearBody()


Examples of javax.servlet.jsp.tagext.BodyContent.clearBody()

   
    try {
      BodyContent body = getBodyContent();     
      if (body != null) {
        writer.print(body.getString());
        body.clearBody();
      }
   
    } catch (IOException e) {
      logger.error(e);
      throw new JspException();
View Full Code Here

Examples of net.timewalker.ffmq3.common.message.EmptyMessageImpl.clearBody()

  }
 
  public void testClearBody() throws Exception
  {
    Message msg = new EmptyMessageImpl();
    msg.clearBody();
  }
}
View Full Code Here

Examples of org.activemq.message.ActiveMQMapMessage.clearBody()

    ActiveMQMapMessage msg = new ActiveMQMapMessage();
    try {
      msg.setBoolean(name,true);
      msg.setReadOnly(true);
      assertTrue(msg.getBoolean(name));
      msg.clearBody();
      msg.setString(name,"true");
      assertTrue(msg.getBoolean(name));
    }catch(JMSException jmsEx){
      jmsEx.printStackTrace();
      assertTrue(false);
View Full Code Here

Examples of org.activemq.message.ActiveMQStreamMessage.clearBody()

     
      short testShort = 3;
      msg.writeShort(testShort);
      msg.reset();
      assertTrue(((Short)msg.readObject()).shortValue()==testShort);
      msg.clearBody();
     
      int testInt = 4;
      msg.writeInt(testInt);
      msg.reset();
      assertTrue(((Integer)msg.readObject()).intValue()==testInt);
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQBytesMessage.clearBody()

    /* new */
    public void testClearBody() throws JMSException {
        ActiveMQBytesMessage bytesMessage = new ActiveMQBytesMessage();
        try {
            bytesMessage.writeInt(1);
            bytesMessage.clearBody();
            assertFalse(bytesMessage.isReadOnlyBody());
            bytesMessage.writeInt(1);
            bytesMessage.readInt();
        } catch (MessageNotReadableException mnwe) {
        } catch (MessageNotWriteableException mnwe) {
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQMapMessage.clearBody()

    public void testGetBoolean() throws JMSException {
        ActiveMQMapMessage msg = new ActiveMQMapMessage();
        msg.setBoolean(name, true);
        msg.setReadOnlyBody(true);
        assertTrue(msg.getBoolean(name));
        msg.clearBody();
        msg.setString(name, "true");
       
        msg = (ActiveMQMapMessage) msg.copy();
       
        assertTrue(msg.getBoolean(name));
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQObjectMessage.clearBody()

    public void testClearBody() throws JMSException {
        ActiveMQObjectMessage objectMessage = new ActiveMQObjectMessage();
        try {
            objectMessage.setObject("String");
            objectMessage.clearBody();
            assertFalse(objectMessage.isReadOnlyBody());
            assertNull(objectMessage.getObject());
            objectMessage.setObject("String");
            objectMessage.getObject();
        } catch (MessageNotWriteableException mnwe) {
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQStreamMessage.clearBody()

        try {
            byte testByte = (byte) 2;
            msg.writeString(new Byte(testByte).toString());
            msg.reset();
            assertTrue(msg.readByte() == testByte);
            msg.clearBody();
            short testShort = 3;
            msg.writeString(new Short(testShort).toString());
            msg.reset();
            assertTrue(msg.readShort() == testShort);
            msg.clearBody();
View Full Code Here

Examples of org.apache.activemq.command.Message.clearBody()

        super.messageExpired(context, messageReference);
        try {
            if(!messageReference.isAdvisory()) {
                ActiveMQTopic topic = AdvisorySupport.getExpiredMessageTopic(messageReference.getMessage().getDestination());
                Message payload = messageReference.getMessage().copy();
                payload.clearBody();
                ActiveMQMessage advisoryMessage = new ActiveMQMessage();
                advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_MESSAGE_ID, payload.getMessageId().toString());
                fireAdvisory(context, topic, payload, null, advisoryMessage);
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.activemq.command.Message.clearBody()

        super.messageConsumed(context, messageReference);
        try {
            if(!messageReference.isAdvisory()) {
                ActiveMQTopic topic = AdvisorySupport.getMessageConsumedAdvisoryTopic(messageReference.getMessage().getDestination());
                Message payload = messageReference.getMessage().copy();
                payload.clearBody();
                fireAdvisory(context, topic,payload);
            }
        } catch (Exception e) {
            LOG.warn("Failed to fire message consumed advisory");
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.