|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.mimo.netty.handler.codec.icap.AbstractIcapMessage
public abstract class AbstractIcapMessage
This is the main Icap message implementation where
all common @see DefaultIcapRequest and @see DefaultIcapResponse member are present.
| Constructor Summary | |
|---|---|
AbstractIcapMessage(IcapVersion version)
|
|
| Method Summary | |
|---|---|
IcapMessage |
addHeader(String name,
Object value)
Adds a new header with the specified name and value. |
IcapMessage |
clearHeaders()
Removes all headers from this message. |
boolean |
containsHeader(String name)
|
boolean |
containsHttpRequest()
|
boolean |
containsHttpResponse()
|
IcapMessageElementEnum |
getBodyType()
|
Encapsulated |
getEncapsulatedHeader()
|
String |
getHeader(String name)
Returns the header value with the specified header name. |
Set<String> |
getHeaderNames()
|
Set<Map.Entry<String,String>> |
getHeaders()
Returns the all header names and values that this message contains. |
Set<String> |
getHeaders(String name)
Returns the header values with the specified header name. |
org.jboss.netty.handler.codec.http.HttpRequest |
getHttpRequest()
|
org.jboss.netty.handler.codec.http.HttpResponse |
getHttpResponse()
|
int |
getPreviewAmount()
|
IcapVersion |
getProtocolVersion()
|
boolean |
isPreviewMessage()
|
IcapMessage |
removeHeader(String name)
Removes the header with the specified name. |
IcapMessage |
setBody(IcapMessageElementEnum body)
Sets the indication that this icap message contains a body of some kind. |
IcapMessage |
setEncapsulatedHeader(Encapsulated encapsulated)
Sets the @see Encapsulated Encapsulation header for this message |
IcapMessage |
setHeader(String name,
Iterable<?> values)
Sets a new header with the specified name and values. |
IcapMessage |
setHeader(String name,
Object value)
Sets a new header with the specified name and value. |
IcapMessage |
setHttpRequest(org.jboss.netty.handler.codec.http.HttpRequest httpRequest)
|
IcapMessage |
setHttpResponse(org.jboss.netty.handler.codec.http.HttpResponse response)
Adds a @see HttpResponse to the Icap message. |
IcapMessage |
setProtocolVersion(IcapVersion version)
Sets the protocol version of this message. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractIcapMessage(IcapVersion version)
| Method Detail |
|---|
public String getHeader(String name)
IcapMessage
getHeader in interface IcapMessagenull if there is no such headerpublic Set<String> getHeaders(String name)
IcapMessage
getHeaders in interface IcapMessageList of header values. An empty list if there is no
such header.public Set<Map.Entry<String,String>> getHeaders()
IcapMessage
getHeaders in interface IcapMessageList of the header name-value pairs. An empty list
if there is no header in this message.public boolean containsHeader(String name)
containsHeader in interface IcapMessagename - header name
true if and only if there is a header with the specified
header name.public Set<String> getHeaderNames()
getHeaderNames in interface IcapMessageSet of all header names that this message contains.
public IcapMessage addHeader(String name,
Object value)
IcapMessage
addHeader in interface IcapMessagename - header namevalue - for the given name
public IcapMessage setHeader(String name,
Object value)
IcapMessage
setHeader in interface IcapMessagename - header namevalue - for the given name
public IcapMessage setHeader(String name,
Iterable<?> values)
IcapMessage
setHeader in interface IcapMessagename - header namevalues - for the given name
public IcapMessage removeHeader(String name)
IcapMessage
removeHeader in interface IcapMessagepublic int getPreviewAmount()
getPreviewAmount in interface IcapMessageInteger preview header value.public IcapMessage clearHeaders()
IcapMessage
clearHeaders in interface IcapMessagepublic IcapVersion getProtocolVersion()
getProtocolVersion in interface IcapMessagepublic IcapMessage setProtocolVersion(IcapVersion version)
IcapMessage
setProtocolVersion in interface IcapMessageversion - @see IcapVersion
public boolean containsHttpRequest()
containsHttpRequest in interface IcapMessagepublic org.jboss.netty.handler.codec.http.HttpRequest getHttpRequest()
getHttpRequest in interface IcapMessageHttpRequestpublic IcapMessage setHttpRequest(org.jboss.netty.handler.codec.http.HttpRequest httpRequest)
setHttpRequest in interface IcapMessagepublic boolean containsHttpResponse()
containsHttpResponse in interface IcapMessagepublic org.jboss.netty.handler.codec.http.HttpResponse getHttpResponse()
getHttpResponse in interface IcapMessageHttpResponsepublic IcapMessage setHttpResponse(org.jboss.netty.handler.codec.http.HttpResponse response)
IcapMessageHttpResponse to the Icap message.
setHttpResponse in interface IcapMessageresponse - the @see HttpResponse
public IcapMessage setEncapsulatedHeader(Encapsulated encapsulated)
IcapMessageEncapsulated Encapsulation header for this message
setEncapsulatedHeader in interface IcapMessageencapsulated - @see Encapsulated instance
public Encapsulated getEncapsulatedHeader()
getEncapsulatedHeader in interface IcapMessageEncapsulated Encapsulated header valuepublic boolean isPreviewMessage()
isPreviewMessage in interface IcapMessagepublic IcapMessage setBody(IcapMessageElementEnum body)
IcapMessage
setBody in interface IcapMessagebody - @see IcapMessageElementEnum
public IcapMessageElementEnum getBodyType()
getBodyType in interface IcapMessageIcapMessageElementEnum message body indicator.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||