Package org.cef.network
Class CefResponse
- java.lang.Object
-
- org.cef.network.CefResponse
-
public abstract class CefResponse extends java.lang.Object
Class used to represent a web response. The methods of this class may be called on any thread.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CefResponse
create()
Create a new CefRequest object.abstract void
dispose()
Removes the native reference from an unused object.protected void
finalize()
abstract CefLoadHandler.ErrorCode
getError()
Get the response error code.abstract java.lang.String
getHeaderByName(java.lang.String name)
Get the value for the specified response header field.abstract void
getHeaderMap(java.util.Map<java.lang.String,java.lang.String> headerMap)
Get all response header fields.abstract java.lang.String
getMimeType()
Get the response mime type.abstract int
getStatus()
Get the response status code.abstract java.lang.String
getStatusText()
Get the response status text.abstract boolean
isReadOnly()
Returns true if this object is read-only.abstract void
setError(CefLoadHandler.ErrorCode errorCode)
Get the response error code.abstract void
setHeaderByName(java.lang.String name, java.lang.String value, boolean overwrite)
Set the value for the specified response header field.abstract void
setHeaderMap(java.util.Map<java.lang.String,java.lang.String> headerMap)
Set all response header fields.abstract void
setMimeType(java.lang.String mimeType)
Set the response mime type.abstract void
setStatus(int status)
Set the response status code.abstract void
setStatusText(java.lang.String statusText)
Set the response status text.java.lang.String
toString()
-
-
-
Method Detail
-
finalize
protected void finalize() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
create
public static final CefResponse create()
Create a new CefRequest object.
-
dispose
public abstract void dispose()
Removes the native reference from an unused object.
-
isReadOnly
public abstract boolean isReadOnly()
Returns true if this object is read-only.
-
getError
public abstract CefLoadHandler.ErrorCode getError()
Get the response error code. Returns ERR_NONE if there was no error.
-
setError
public abstract void setError(CefLoadHandler.ErrorCode errorCode)
Get the response error code. Returns ERR_NONE if there was no error.
-
getStatus
public abstract int getStatus()
Get the response status code.
-
setStatus
public abstract void setStatus(int status)
Set the response status code.
-
getStatusText
public abstract java.lang.String getStatusText()
Get the response status text.
-
setStatusText
public abstract void setStatusText(java.lang.String statusText)
Set the response status text.
-
getMimeType
public abstract java.lang.String getMimeType()
Get the response mime type.
-
setMimeType
public abstract void setMimeType(java.lang.String mimeType)
Set the response mime type.
-
getHeaderByName
public abstract java.lang.String getHeaderByName(java.lang.String name)
Get the value for the specified response header field. Use getHeaderMap instead if there might be multiple values.- Parameters:
name
- The header name.- Returns:
- The header value.
-
setHeaderByName
public abstract void setHeaderByName(java.lang.String name, java.lang.String value, boolean overwrite)
Set the value for the specified response header field.- Parameters:
name
- The header name.value
- The header value.overwrite
- If true any existing values will be replaced with the new value. If false any existing values will not be overwritten.
-
getHeaderMap
public abstract void getHeaderMap(java.util.Map<java.lang.String,java.lang.String> headerMap)
Get all response header fields.
-
setHeaderMap
public abstract void setHeaderMap(java.util.Map<java.lang.String,java.lang.String> headerMap)
Set all response header fields.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-