ch.mimo.netty.handler.codec.icap
Class DefaultIcapRequest
java.lang.Object
ch.mimo.netty.handler.codec.icap.AbstractIcapMessage
ch.mimo.netty.handler.codec.icap.DefaultIcapRequest
- All Implemented Interfaces:
- IcapMessage, IcapRequest
public class DefaultIcapRequest
- extends AbstractIcapMessage
- implements IcapRequest
Main Icap Request implementation. This is the starting point to create a Icap request.
- Author:
- Michael Mimo Moratti (mimo@mimo.ch)
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, toString |
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 |
DefaultIcapRequest
public DefaultIcapRequest(IcapVersion icapVersion,
IcapMethod method,
String uri,
String host)
- This will create an initial icap request with all necessary details.
- Parameters:
icapVersion
- the version of this request.method
- the method.uri
- the uri to reach with this request.host
- the host from where this request originates from. Because this is a mandatory Icap header
you have to give a value and it will be directly added to the icap request as Host: header.
setMethod
public IcapMessage setMethod(IcapMethod method)
- Description copied from interface:
IcapRequest
- Sets the operation method for this icap request.
- Specified by:
setMethod
in interface IcapRequest
- Parameters:
method
- the @see HttpMethod
provided by @see IcapMethod
- Returns:
- self in order to chain the method calls
getMethod
public IcapMethod getMethod()
- Specified by:
getMethod
in interface IcapRequest
- Returns:
- This operations method
setUri
public IcapMessage setUri(String uri)
- Description copied from interface:
IcapRequest
- Sets the operations uri.
- Specified by:
setUri
in interface IcapRequest
- Returns:
- self in order to chain the method calls
getUri
public String getUri()
- Specified by:
getUri
in interface IcapRequest
- Returns:
- String uri for this message
Copyright © 2011. All Rights Reserved.