
public class OHttpResponseWrapper
extends java.lang.Object
| Constructor and Description |
|---|
OHttpResponseWrapper(OHttpResponse iResponse) |
| Modifier and Type | Method and Description |
|---|---|
OHttpResponseWrapper |
flush()
Flushes the content to the TCP/IP socket.
|
java.lang.String[] |
getAdditionalResponseHeaders() |
java.lang.String |
getCharacterSet()
Returns the response's character set used.
|
int |
getCode() |
java.lang.String |
getContent() |
java.lang.String |
getContentType() |
java.lang.String |
getHeader()
Returns the response's additional headers.
|
java.lang.String |
getHttpVersion() |
java.io.OutputStream |
getOutputStream() |
OHttpResponse |
getResponse() |
OHttpResponseWrapper |
send(int iCode,
java.lang.String iReason,
java.lang.String iContentType,
java.lang.Object iContent)
Sends the complete HTTP response in one call.
|
OHttpResponseWrapper |
send(int iCode,
java.lang.String iReason,
java.lang.String iContentType,
java.lang.Object iContent,
java.lang.String iHeaders)
Sends the complete HTTP response in one call specifying additional headers.
|
OHttpResponseWrapper |
sendStream(int iCode,
java.lang.String iReason,
java.lang.String iContentType,
java.io.InputStream iContent,
long iSize)
Sends the complete HTTP response in one call specifying a stream as content.
|
OHttpResponseWrapper |
sendStream(int iCode,
java.lang.String iReason,
java.lang.String iContentType,
java.io.InputStream iContent,
long iSize,
java.lang.String iFileName)
Sends the complete HTTP response in one call specifying a stream as content.
|
OHttpResponseWrapper |
setCharacterSet(java.lang.String iCharacterSet)
Sets the response's character set.
|
void |
setCode(int code) |
void |
setContent(java.lang.String content) |
void |
setContentType(java.lang.String contentType) |
OHttpResponseWrapper |
setHeader(java.lang.String iHeader)
Sets the response's additional headers to send back.
|
OHttpResponseWrapper |
writeContent(java.lang.String iContent)
Writes content directly to the response.
|
OHttpResponseWrapper |
writeHeaders(java.lang.String iContentType)
Sets the response's headers using the keep-alive.
|
OHttpResponseWrapper |
writeHeaders(java.lang.String iContentType,
boolean iKeepAlive)
Sets the response's headers specifying when using the keep-alive or not.
|
OHttpResponseWrapper |
writeLine(java.lang.String iContent)
Writes a line in the response.
|
OHttpResponseWrapper |
writeRecord(com.orientechnologies.orient.core.record.ORecord iRecord)
Writes a record as response.
|
OHttpResponseWrapper |
writeRecord(com.orientechnologies.orient.core.record.ORecord iRecord,
java.lang.String iFetchPlan)
Writes a record as response.
|
OHttpResponseWrapper |
writeRecords(java.util.List<com.orientechnologies.orient.core.db.record.OIdentifiable> iRecords)
Writes records as response.
|
OHttpResponseWrapper |
writeRecords(java.lang.Object iRecords,
java.lang.String iFetchPlan)
Writes records as response specifying a fetch-plan to serialize nested records.
|
OHttpResponseWrapper |
writeStatus(int iHttpCode,
java.lang.String iReason)
Sets the response's status as HTTP code and reason.
|
public OHttpResponseWrapper(OHttpResponse iResponse)
iResponse - public OHttpResponse getResponse()
public java.lang.String getHeader()
public OHttpResponseWrapper setHeader(java.lang.String iHeader)
iHeader - String containing the headerpublic java.lang.String getCharacterSet()
public OHttpResponseWrapper setCharacterSet(java.lang.String iCharacterSet)
iCharacterSet - String containing the charset to usepublic java.lang.String getHttpVersion()
public java.lang.String[] getAdditionalResponseHeaders()
public java.io.OutputStream getOutputStream()
public OHttpResponseWrapper writeStatus(int iHttpCode, java.lang.String iReason) throws java.io.IOException
iHttpCode - Response's HTTP codeiReason - Response's reasonjava.io.IOExceptionpublic OHttpResponseWrapper writeHeaders(java.lang.String iContentType) throws java.io.IOException
iContentType - Response's content typejava.io.IOExceptionpublic OHttpResponseWrapper writeHeaders(java.lang.String iContentType, boolean iKeepAlive) throws java.io.IOException
iContentType - Response's content typeiKeepAlive - Use the keep-alive of the connectionjava.io.IOExceptionpublic OHttpResponseWrapper writeLine(java.lang.String iContent) throws java.io.IOException
iContent - Content to send as stringjava.io.IOExceptionpublic OHttpResponseWrapper writeContent(java.lang.String iContent) throws java.io.IOException
iContent - Content to send as stringjava.io.IOExceptionpublic OHttpResponseWrapper writeRecords(java.util.List<com.orientechnologies.orient.core.db.record.OIdentifiable> iRecords) throws java.io.IOException
iRecords - List of records to serializejava.io.IOExceptionpublic OHttpResponseWrapper writeRecords(java.lang.Object iRecords, java.lang.String iFetchPlan) throws java.io.IOException
iRecords - List of records to serializeiFetchPlan - Fetch plan to specify nested recordsjava.io.IOExceptionpublic OHttpResponseWrapper writeRecord(com.orientechnologies.orient.core.record.ORecord iRecord) throws java.io.IOException
iRecord - Record to serializejava.io.IOExceptionpublic OHttpResponseWrapper writeRecord(com.orientechnologies.orient.core.record.ORecord iRecord, java.lang.String iFetchPlan) throws java.io.IOException
iRecord - Record to serializeiFetchPlan - Fetch plan to specify nested recordsjava.io.IOExceptionpublic OHttpResponseWrapper send(int iCode, java.lang.String iReason, java.lang.String iContentType, java.lang.Object iContent) throws java.io.IOException
iCode - HTTP response's CodeiReason - Response's reasoniContentType - Response's content typeiContent - Content to send. Content can be a string for plain text, binary data to return
directly binary information, OIdentifiable for a single record and
Collectionjava.io.IOExceptionpublic OHttpResponseWrapper send(int iCode, java.lang.String iReason, java.lang.String iContentType, java.lang.Object iContent, java.lang.String iHeaders) throws java.io.IOException
iCode - HTTP response's CodeiReason - Response's reasoniContentType - Response's content typeiContent - Content to send. Content can be a string for plain text, binary data to return
directly binary information, OIdentifiable for a single record and
CollectioniHeaders - Response's additional headersjava.io.IOExceptionpublic OHttpResponseWrapper sendStream(int iCode, java.lang.String iReason, java.lang.String iContentType, java.io.InputStream iContent, long iSize) throws java.io.IOException
iCode - HTTP response's CodeiReason - Response's reasoniContentType - Response's content typeiContent - java.io.InputStream objectiSize - Content size in bytesjava.io.IOExceptionpublic OHttpResponseWrapper sendStream(int iCode, java.lang.String iReason, java.lang.String iContentType, java.io.InputStream iContent, long iSize, java.lang.String iFileName) throws java.io.IOException
iCode - HTTP response's CodeiReason - Response's reasoniContentType - Response's content typeiContent - java.io.InputStream objectiSize - Content size in bytesiFileName - Optional file namejava.io.IOExceptionpublic OHttpResponseWrapper flush() throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
public java.lang.String getContent()
public void setContent(java.lang.String content)
public int getCode()
public void setCode(int code)
Copyright © 2009–2022 OrientDB. All rights reserved.