|
||||||||||
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 IcapMessage
null
if there is no such headerpublic Set<String> getHeaders(String name)
IcapMessage
getHeaders
in interface IcapMessage
List
of header values. An empty list if there is no
such header.public Set<Map.Entry<String,String>> getHeaders()
IcapMessage
getHeaders
in interface IcapMessage
List
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 IcapMessage
name
- header name
true
if and only if there is a header with the specified
header name.public Set<String> getHeaderNames()
getHeaderNames
in interface IcapMessage
Set
of all header names that this message contains.public IcapMessage addHeader(String name, Object value)
IcapMessage
addHeader
in interface IcapMessage
name
- header namevalue
- for the given name
public IcapMessage setHeader(String name, Object value)
IcapMessage
setHeader
in interface IcapMessage
name
- header namevalue
- for the given name
public IcapMessage setHeader(String name, Iterable<?> values)
IcapMessage
setHeader
in interface IcapMessage
name
- header namevalues
- for the given name
public IcapMessage removeHeader(String name)
IcapMessage
removeHeader
in interface IcapMessage
public int getPreviewAmount()
getPreviewAmount
in interface IcapMessage
Integer
preview header value.public IcapMessage clearHeaders()
IcapMessage
clearHeaders
in interface IcapMessage
public IcapVersion getProtocolVersion()
getProtocolVersion
in interface IcapMessage
public IcapMessage setProtocolVersion(IcapVersion version)
IcapMessage
setProtocolVersion
in interface IcapMessage
version
- @see IcapVersion
public boolean containsHttpRequest()
containsHttpRequest
in interface IcapMessage
public org.jboss.netty.handler.codec.http.HttpRequest getHttpRequest()
getHttpRequest
in interface IcapMessage
HttpRequest
public IcapMessage setHttpRequest(org.jboss.netty.handler.codec.http.HttpRequest httpRequest)
setHttpRequest
in interface IcapMessage
public boolean containsHttpResponse()
containsHttpResponse
in interface IcapMessage
public org.jboss.netty.handler.codec.http.HttpResponse getHttpResponse()
getHttpResponse
in interface IcapMessage
HttpResponse
public IcapMessage setHttpResponse(org.jboss.netty.handler.codec.http.HttpResponse response)
IcapMessage
HttpResponse
to the Icap message.
setHttpResponse
in interface IcapMessage
response
- the @see HttpResponse
public IcapMessage setEncapsulatedHeader(Encapsulated encapsulated)
IcapMessage
Encapsulated
Encapsulation header for this message
setEncapsulatedHeader
in interface IcapMessage
encapsulated
- @see Encapsulated
instance
public Encapsulated getEncapsulatedHeader()
getEncapsulatedHeader
in interface IcapMessage
Encapsulated
Encapsulated header valuepublic boolean isPreviewMessage()
isPreviewMessage
in interface IcapMessage
public IcapMessage setBody(IcapMessageElementEnum body)
IcapMessage
setBody
in interface IcapMessage
body
- @see IcapMessageElementEnum
public IcapMessageElementEnum getBodyType()
getBodyType
in interface IcapMessage
IcapMessageElementEnum
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 |