Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
XmlMessageEOFProtocol |
|
| 0.0;0 |
1 | /* | |
2 | * $Id: XmlMessageEOFProtocol.java 20321 2010-11-24 15:21:24Z dfeist $ | |
3 | * -------------------------------------------------------------------------------------- | |
4 | * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.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 | 0 | 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 | 0 | return patternIndex < 0; |
32 | } | |
33 | ||
34 | } |