Coverage Report - org.mule.transport.tcp.protocols.XmlMessageEOFProtocol
 
Classes in this File Line Coverage Branch Coverage Complexity
XmlMessageEOFProtocol
100%
2/2
100%
2/2
1
 
 1  
 /*
 2  
  * $Id: XmlMessageEOFProtocol.java 10489 2008-01-23 17:53:38Z dfeist $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.transport.tcp.protocols;
 12  
 
 13  
 /**
 14  
  * Extend {@link org.mule.transport.tcp.protocols.XmlMessageProtocol} to continue reading
 15  
  * until either a new message or EOF is found.
 16  
  */
 17  8
 public class XmlMessageEOFProtocol extends XmlMessageProtocol
 18  
 {
 19  
 
 20  
     /**
 21  
      * Continue reading til EOF or new document found
 22  
      *
 23  
      * @param patternIndex The index of the xml tag (or -1 if the next message not found)
 24  
      * @param len The amount of data read this loop (or -1 if EOF)
 25  
      * @param available The amount of data available to read
 26  
      * @return true if the read should continue
 27  
      */
 28  
     // @Override
 29  
     protected boolean isRepeat(int patternIndex, int len, int available)
 30  
     {
 31  114
         return patternIndex < 0;
 32  
     }
 33  
 
 34  
 }