ch.mimo.netty.handler.codec.icap
Class DefaultIcapResponse

java.lang.Object
  extended by ch.mimo.netty.handler.codec.icap.AbstractIcapMessage
      extended by ch.mimo.netty.handler.codec.icap.DefaultIcapResponse
All Implemented Interfaces:
IcapMessage, IcapResponse

public class DefaultIcapResponse
extends AbstractIcapMessage
implements IcapResponse

Main Icap Response implementation. This is the starting point to create any Icap response.

Author:
Michael Mimo Moratti (mimo@mimo.ch)

Constructor Summary
DefaultIcapResponse(IcapVersion version, IcapResponseStatus status)
          Will create an instance of IcapResponse.
 
Method Summary
 org.jboss.netty.buffer.ChannelBuffer getContent()
          Gets an OPTIONS body if present
 IcapResponseStatus getStatus()
          Gets the response status for this message.
 void setContent(org.jboss.netty.buffer.ChannelBuffer optionsContent)
          Sets an OPTIONS body to this message.
 void setStatus(IcapResponseStatus status)
          Sets the response status
 String toString()
           
 
Methods inherited from class ch.mimo.netty.handler.codec.icap.AbstractIcapMessage
addHeader, clearHeaders, containsHeader, containsHttpRequest, containsHttpResponse, getBodyType, getEncapsulatedHeader, getHeader, getHeaderNames, getHeaders, getHeaders, getHttpRequest, getHttpResponse, getPreviewAmount, getProtocolVersion, isPreviewMessage, removeHeader, setBody, setEncapsulatedHeader, setHeader, setHeader, setHttpRequest, setHttpResponse, setProtocolVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ch.mimo.netty.handler.codec.icap.IcapMessage
addHeader, clearHeaders, containsHeader, containsHttpRequest, containsHttpResponse, getBodyType, getEncapsulatedHeader, getHeader, getHeaderNames, getHeaders, getHeaders, getHttpRequest, getHttpResponse, getPreviewAmount, getProtocolVersion, isPreviewMessage, removeHeader, setBody, setEncapsulatedHeader, setHeader, setHeader, setHttpRequest, setHttpResponse, setProtocolVersion
 

Constructor Detail

DefaultIcapResponse

public DefaultIcapResponse(IcapVersion version,
                           IcapResponseStatus status)
Will create an instance of IcapResponse.

Parameters:
version - the version of the response.
status - the Status code that has to be reported back. (200 OK...)
Method Detail

setStatus

public void setStatus(IcapResponseStatus status)
Description copied from interface: IcapResponse
Sets the response status

Specified by:
setStatus in interface IcapResponse
Parameters:
status - @see IcapResponseStatus value like 200 OK.

getStatus

public IcapResponseStatus getStatus()
Description copied from interface: IcapResponse
Gets the response status for this message.

Specified by:
getStatus in interface IcapResponse
Returns:
the response status as @see IcapResponseStatus

setContent

public void setContent(org.jboss.netty.buffer.ChannelBuffer optionsContent)
Description copied from interface: IcapResponse
Sets an OPTIONS body to this message.

Specified by:
setContent in interface IcapResponse
Parameters:
optionsContent - @see ChannelBuffer containing the body.

getContent

public org.jboss.netty.buffer.ChannelBuffer getContent()
Description copied from interface: IcapResponse
Gets an OPTIONS body if present

Specified by:
getContent in interface IcapResponse
Returns:
@see ChannelBuffer or null

toString

public String toString()
Overrides:
toString in class AbstractIcapMessage


Copyright © 2011. All Rights Reserved.