View Javadoc

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.buffer.ChannelBuffer;
17  
18  /**
19   * ICAP response.
20   * 
21   * @author Michael Mimo Moratti (mimo@mimo.ch)
22   *
23   * @see IcapMessage
24   * @see DefaultIcapResponse
25   */
26  public interface IcapResponse extends IcapMessage {
27  
28  	/**
29  	 * Sets the response status
30  	 * @param status @see {@link IcapResponseStatus} value like 200 OK.
31  	 */
32  	void setStatus(IcapResponseStatus status);
33  	
34  	/**
35  	 * Gets the response status for this message.
36  	 * 
37  	 * @return the response status as @see {@link IcapResponseStatus}
38  	 */
39  	IcapResponseStatus getStatus();
40  	
41  	/**
42  	 * Sets an OPTIONS body to this message.
43  	 * @param optionsContent @see {@link ChannelBuffer} containing the body.
44  	 */
45  	void setContent(ChannelBuffer optionsContent);
46  
47  	/**
48  	 * Gets an OPTIONS body if present
49  	 * @return @see {@link ChannelBuffer} or null
50  	 */
51  	ChannelBuffer getContent();
52  }