1 /*******************************************************************************
2 * Copyright (c) 2011 Michael Mimo Moratti.
3 *
4 * Michael Mimo Moratti licenses this file to you under the Apache License, version 2.0
5 * (the "License"); you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11 * License for the specific language governing permissions and limitations
12 * under the License.
13 *******************************************************************************/
14 package ch.mimo.netty.handler.codec.icap;
15
16 import org.jboss.netty.handler.codec.http.HttpChunk;
17
18 /**
19 * This is the main ICAP Chunk. In essence it is a @see {@link HttpChunk} with the addition of
20 * Preview controls and members.
21 *
22 * @author Michael Mimo Moratti (mimo@mimo.ch)
23 *
24 */
25 public interface IcapChunk extends HttpChunk {
26
27 /**
28 * Toggles whether this chunk belongs to a preview message.
29 *
30 * @param preview boolean true to indicate it is a preview chunk
31 */
32 void setPreviewChunk(boolean preview);
33
34 /**
35 * Gets whether this chunk belongs to a preview message.
36 *
37 * @return boolean true if this chunk is preview.
38 */
39 boolean isPreviewChunk();
40
41 /**
42 * Toggles whether this chunk belongs to a early terminated preview message.
43 *
44 * @param earlyTermination boolean true if the preview message is early terminated.
45 */
46 void setEarlyTermination(boolean earlyTermination);
47
48 /**
49 * Gets whether this chunk belongs to a early terminated preview message.
50 *
51 * @return boolean true if the preview message is early terminated.
52 */
53 boolean isEarlyTerminated();
54 }