Class OHttpResponseAbstract
java.lang.Object
com.orientechnologies.orient.server.network.protocol.http.OHttpResponseAbstract
- All Implemented Interfaces:
OHttpResponse
- Direct Known Subclasses:
OHttpGraphResponse,OHttpResponseImpl
Maintains information about current HTTP response.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Field Summary
FieldsFields inherited from interface com.orientechnologies.orient.server.network.protocol.http.OHttpResponse
JSON_FORMAT -
Constructor Summary
ConstructorsConstructorDescriptionOHttpResponseAbstract(OutputStream iOutStream, String iHttpVersion, String[] iAdditionalHeaders, String iResponseCharSet, String iServerInfo, String iSessionId, String iCallbackFunction, boolean iKeepAlive, OClientConnection connection, OContextConfiguration contextConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionvoidbyte[]voidflush()voidformatMultiValue(Iterator<?> iIterator, Writer buffer, String format) String[]intgetCode()getOut()booleanbooleanbooleanbooleanbooleanabstract voidabstract voidsendStream(int iCode, String iReason, String iContentType, InputStream iContent, long iSize) abstract voidsendStream(int iCode, String iReason, String iContentType, InputStream iContent, long iSize, String iFileName) abstract voidsendStream(int iCode, String iReason, String iContentType, InputStream iContent, long iSize, String iFileName, Map<String, String> additionalHeaders) abstract voidsendStream(int iCode, String iReason, String iContentType, String iFileName, OCallable<Void, OChunkedResponse> iWriter) voidsetAdditionalHeaders(String[] additionalHeaders) voidsetCallbackFunction(String callbackFunction) voidsetCharacterSet(String characterSet) voidsetCode(int code) voidsetConnection(OClientConnection connection) voidsetContent(String content) voidsetContentEncoding(String contentEncoding) voidsetContentType(String contentType) voidDeprecated.voidsetHeaders(String headers) voidsetJsonErrorResponse(boolean jsonErrorResponse) voidsetKeepAlive(boolean keepAlive) voidsetSameSiteCookie(boolean sameSiteCookie) voidsetSendStarted(boolean sendStarted) voidsetServerInfo(String serverInfo) voidsetSessionId(String sessionId) voidsetStaticEncoding(String contentEncoding) voidsetStreaming(boolean streaming) voidwriteContent(String iContent) voidwriteHeaders(String iContentType) voidwriteHeaders(String iContentType, boolean iKeepAlive) voidvoidwriteRecord(ORecord iRecord) voidwriteRecord(ORecord iRecord, String iFetchPlan, String iFormat) voidwriteRecords(Object iRecords) voidwriteRecords(Object iRecords, String iFetchPlan) voidwriteRecords(Object iRecords, String iFetchPlan, String iFormat, String accept) voidwriteRecords(Object iRecords, String iFetchPlan, String iFormat, String accept, Map<String, Object> iAdditionalProperties) voidwriteRecords(Object iRecords, String iFetchPlan, String iFormat, String accept, Map<String, Object> iAdditionalProperties, String mode) voidwriteResult(Object result) voidwriteResult(Object iResult, String iFormat, String iAccept) voidwriteResult(Object iResult, String iFormat, String iAccept, Map<String, Object> iAdditionalProperties) voidwriteResult(Object iResult, String iFormat, String iAccept, Map<String, Object> iAdditionalProperties, String mode) abstract voidwriteStatus(int iStatus, String iReason) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.server.network.protocol.http.OHttpResponse
checkConnection
-
Field Details
-
URL_SEPARATOR
public static final char[] URL_SEPARATOR -
utf8
-
-
Constructor Details
-
OHttpResponseAbstract
public OHttpResponseAbstract(OutputStream iOutStream, String iHttpVersion, String[] iAdditionalHeaders, String iResponseCharSet, String iServerInfo, String iSessionId, String iCallbackFunction, boolean iKeepAlive, OClientConnection connection, OContextConfiguration contextConfiguration)
-
-
Method Details
-
send
public abstract void send(int iCode, String iReason, String iContentType, Object iContent, String iHeaders) throws IOException - Specified by:
sendin interfaceOHttpResponse- Throws:
IOException
-
writeStatus
- Specified by:
writeStatusin interfaceOHttpResponse- Throws:
IOException
-
writeHeaders
- Specified by:
writeHeadersin interfaceOHttpResponse- Throws:
IOException
-
writeHeaders
- Specified by:
writeHeadersin interfaceOHttpResponse- Throws:
IOException
-
writeLine
- Specified by:
writeLinein interfaceOHttpResponse- Throws:
IOException
-
writeContent
- Specified by:
writeContentin interfaceOHttpResponse- Throws:
IOException
-
writeResult
- Specified by:
writeResultin interfaceOHttpResponse- Throws:
InterruptedExceptionIOException
-
writeResult
public void writeResult(Object iResult, String iFormat, String iAccept) throws InterruptedException, IOException - Specified by:
writeResultin interfaceOHttpResponse- Throws:
InterruptedExceptionIOException
-
writeResult
public void writeResult(Object iResult, String iFormat, String iAccept, Map<String, Object> iAdditionalProperties) throws InterruptedException, IOException- Specified by:
writeResultin interfaceOHttpResponse- Throws:
InterruptedExceptionIOException
-
writeResult
public void writeResult(Object iResult, String iFormat, String iAccept, Map<String, Object> iAdditionalProperties, String mode) throws InterruptedException, IOException- Specified by:
writeResultin interfaceOHttpResponse- Throws:
InterruptedExceptionIOException
-
writeRecords
- Specified by:
writeRecordsin interfaceOHttpResponse- Throws:
IOException
-
writeRecords
- Specified by:
writeRecordsin interfaceOHttpResponse- Throws:
IOException
-
writeRecords
public void writeRecords(Object iRecords, String iFetchPlan, String iFormat, String accept) throws IOException - Specified by:
writeRecordsin interfaceOHttpResponse- Throws:
IOException
-
writeRecords
public void writeRecords(Object iRecords, String iFetchPlan, String iFormat, String accept, Map<String, Object> iAdditionalProperties) throws IOException- Specified by:
writeRecordsin interfaceOHttpResponse- Throws:
IOException
-
writeRecords
public void writeRecords(Object iRecords, String iFetchPlan, String iFormat, String accept, Map<String, Object> iAdditionalProperties, String mode) throws IOException- Specified by:
writeRecordsin interfaceOHttpResponse- Throws:
IOException
-
formatMultiValue
public void formatMultiValue(Iterator<?> iIterator, Writer buffer, String format) throws IOException - Specified by:
formatMultiValuein interfaceOHttpResponse- Throws:
IOException
-
writeRecord
- Specified by:
writeRecordin interfaceOHttpResponse- Throws:
IOException
-
writeRecord
- Specified by:
writeRecordin interfaceOHttpResponse- Throws:
IOException
-
sendStream
public abstract void sendStream(int iCode, String iReason, String iContentType, InputStream iContent, long iSize) throws IOException - Specified by:
sendStreamin interfaceOHttpResponse- Throws:
IOException
-
sendStream
public abstract void sendStream(int iCode, String iReason, String iContentType, InputStream iContent, long iSize, String iFileName) throws IOException - Specified by:
sendStreamin interfaceOHttpResponse- Throws:
IOException
-
sendStream
public abstract void sendStream(int iCode, String iReason, String iContentType, InputStream iContent, long iSize, String iFileName, Map<String, String> additionalHeaders) throws IOException- Specified by:
sendStreamin interfaceOHttpResponse- Throws:
IOException
-
sendStream
public abstract void sendStream(int iCode, String iReason, String iContentType, String iFileName, OCallable<Void, OChunkedResponse> iWriter) throws IOException- Specified by:
sendStreamin interfaceOHttpResponse- Throws:
IOException
-
compress
- Specified by:
compressin interfaceOHttpResponse
-
setHeader
Deprecated.Stores additional headers to send- Specified by:
setHeaderin interfaceOHttpResponse
-
getOutputStream
- Specified by:
getOutputStreamin interfaceOHttpResponse
-
flush
- Specified by:
flushin interfaceOHttpResponse- Throws:
IOException
-
getContentType
- Specified by:
getContentTypein interfaceOHttpResponse
-
setContentType
- Specified by:
setContentTypein interfaceOHttpResponse
-
getContentEncoding
- Specified by:
getContentEncodingin interfaceOHttpResponse
-
setContentEncoding
- Specified by:
setContentEncodingin interfaceOHttpResponse
-
setStaticEncoding
- Specified by:
setStaticEncodingin interfaceOHttpResponse
-
setSessionId
- Specified by:
setSessionIdin interfaceOHttpResponse
-
getContent
- Specified by:
getContentin interfaceOHttpResponse
-
setContent
- Specified by:
setContentin interfaceOHttpResponse
-
getCode
public int getCode()- Specified by:
getCodein interfaceOHttpResponse
-
setCode
public void setCode(int code) - Specified by:
setCodein interfaceOHttpResponse
-
setJsonErrorResponse
public void setJsonErrorResponse(boolean jsonErrorResponse) - Specified by:
setJsonErrorResponsein interfaceOHttpResponse
-
setStreaming
public void setStreaming(boolean streaming) - Specified by:
setStreamingin interfaceOHttpResponse
-
getHttpVersion
- Specified by:
getHttpVersionin interfaceOHttpResponse
-
getOut
- Specified by:
getOutin interfaceOHttpResponse
-
getHeaders
- Specified by:
getHeadersin interfaceOHttpResponse
-
setHeaders
- Specified by:
setHeadersin interfaceOHttpResponse
-
getAdditionalHeaders
- Specified by:
getAdditionalHeadersin interfaceOHttpResponse
-
setAdditionalHeaders
- Specified by:
setAdditionalHeadersin interfaceOHttpResponse
-
getCharacterSet
- Specified by:
getCharacterSetin interfaceOHttpResponse
-
setCharacterSet
- Specified by:
setCharacterSetin interfaceOHttpResponse
-
getServerInfo
- Specified by:
getServerInfoin interfaceOHttpResponse
-
setServerInfo
- Specified by:
setServerInfoin interfaceOHttpResponse
-
getSessionId
- Specified by:
getSessionIdin interfaceOHttpResponse
-
getCallbackFunction
- Specified by:
getCallbackFunctionin interfaceOHttpResponse
-
setCallbackFunction
- Specified by:
setCallbackFunctionin interfaceOHttpResponse
-
getStaticEncoding
- Specified by:
getStaticEncodingin interfaceOHttpResponse
-
isSendStarted
public boolean isSendStarted()- Specified by:
isSendStartedin interfaceOHttpResponse
-
setSendStarted
public void setSendStarted(boolean sendStarted) - Specified by:
setSendStartedin interfaceOHttpResponse
-
isKeepAlive
public boolean isKeepAlive()- Specified by:
isKeepAlivein interfaceOHttpResponse
-
setKeepAlive
public void setKeepAlive(boolean keepAlive) - Specified by:
setKeepAlivein interfaceOHttpResponse
-
isJsonErrorResponse
public boolean isJsonErrorResponse()- Specified by:
isJsonErrorResponsein interfaceOHttpResponse
-
getConnection
- Specified by:
getConnectionin interfaceOHttpResponse
-
setConnection
- Specified by:
setConnectionin interfaceOHttpResponse
-
isStreaming
public boolean isStreaming()- Specified by:
isStreamingin interfaceOHttpResponse
-
setSameSiteCookie
public void setSameSiteCookie(boolean sameSiteCookie) - Specified by:
setSameSiteCookiein interfaceOHttpResponse
-
isSameSiteCookie
public boolean isSameSiteCookie()- Specified by:
isSameSiteCookiein interfaceOHttpResponse
-
getContextConfiguration
- Specified by:
getContextConfigurationin interfaceOHttpResponse
-
addHeader
- Specified by:
addHeaderin interfaceOHttpResponse
-
getHeadersMap
- Specified by:
getHeadersMapin interfaceOHttpResponse
-