public class HttpChannel
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpChannel.MultipartFormBody
Utilities for generating POST request body for multipart/form-data
Example boundary: ------------------------933ed83bed2bbd3c
Example form body:
--------------------------933ed83bed2bbd3c
Content-Disposition: form-data; name="key"
-Z30HIE1I9xvUfwcXyLlHA==
--------------------------933ed83bed2bbd3c
Content-Disposition: form-data; name="grant_type"
apikey
--------------------------933ed83bed2bbd3c--
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
RCV_TIME_HEADER |
static java.lang.String |
USEHTTP_PROPERTY_NAME |
| Constructor and Description |
|---|
HttpChannel(java.nio.channels.ByteChannel channel,
java.lang.String method,
java.lang.String path,
int bufferSize,
int timeoutMillis,
java.util.logging.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addPathSegment(java.lang.StringBuffer sb,
java.lang.String seg) |
static java.lang.String |
buildHttpPath(java.lang.String serverPath,
java.lang.String basePath) |
int |
getBufferSize() |
java.nio.channels.ByteChannel |
getChannel() |
java.lang.String |
getReponseCookieValue(java.lang.String key) |
java.lang.String |
getRequestHeader(java.lang.String header) |
int |
getResponseCode() |
java.lang.String |
getResponseConnection() |
java.lang.String |
getResponseContentBoundary() |
int |
getResponseContentLength() |
java.lang.String |
getResponseContentType() |
java.lang.String |
getResponseContentTypeField(java.lang.String fieldName) |
java.lang.String |
getResponseHeader(java.lang.String headerName) |
long |
getResponseHeaderRecvTime() |
java.util.List<java.lang.String> |
getResponseHeaders(java.lang.String headerName) |
com.fasterxml.jackson.databind.JsonNode |
getResponseJsonBody() |
long |
getResponseKeepaliveExpireTime() |
int |
getResponseKeepaliveSeconds() |
java.lang.String |
getResponseMessage() |
java.io.InputStream |
getResponseStream() |
java.lang.String |
getServerVersion() |
boolean |
isResponseChunked() |
static boolean |
isUseHTTP() |
void |
reset(java.lang.String method,
java.lang.String path) |
void |
setCloseOutputIfNoContentLength(boolean value) |
void |
setCommit(boolean val) |
void |
setRequestContentLength(int length) |
void |
setRequestContentType(java.lang.String value) |
void |
setRequestHeader(java.lang.String header,
java.lang.String value) |
static void |
setUseHTTP(boolean val) |
void |
suppressHeaders() |
int |
write(byte[] bytes) |
int |
write(byte[] bytes,
int offset,
int length) |
void |
write(java.nio.ByteBuffer buffer) |
void |
writeString(java.lang.String value) |
public static final java.lang.String USEHTTP_PROPERTY_NAME
public static final java.lang.String RCV_TIME_HEADER
public HttpChannel(java.nio.channels.ByteChannel channel,
java.lang.String method,
java.lang.String path,
int bufferSize,
int timeoutMillis,
java.util.logging.Logger logger)
public static boolean isUseHTTP()
public static void setUseHTTP(boolean val)
public void setCommit(boolean val)
public void reset(java.lang.String method,
java.lang.String path)
public java.nio.channels.ByteChannel getChannel()
public void setCloseOutputIfNoContentLength(boolean value)
public int write(byte[] bytes,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionpublic int write(byte[] bytes)
throws java.io.IOException
java.io.IOExceptionpublic void writeString(java.lang.String value)
throws java.io.IOException
java.io.IOExceptionpublic void write(java.nio.ByteBuffer buffer)
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getResponseStream()
throws java.io.IOException
java.io.IOExceptionpublic void setRequestHeader(java.lang.String header,
java.lang.String value)
public java.lang.String getRequestHeader(java.lang.String header)
public void setRequestContentType(java.lang.String value)
public void setRequestContentLength(int length)
public java.lang.String getResponseHeader(java.lang.String headerName)
throws java.io.IOException
java.io.IOExceptionpublic java.util.List<java.lang.String> getResponseHeaders(java.lang.String headerName)
throws java.io.IOException
java.io.IOExceptionpublic int getResponseCode()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getResponseMessage()
throws java.io.IOException
java.io.IOExceptionpublic int getResponseContentLength()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getResponseContentType()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getResponseContentTypeField(java.lang.String fieldName)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getResponseContentBoundary()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getReponseCookieValue(java.lang.String key)
throws java.io.IOException
java.io.IOExceptionpublic boolean isResponseChunked()
throws java.io.IOException
java.io.IOExceptionpublic long getResponseHeaderRecvTime()
throws java.io.IOException
java.io.IOExceptionpublic long getResponseKeepaliveExpireTime()
throws java.io.IOException
java.io.IOExceptionpublic int getResponseKeepaliveSeconds()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getResponseConnection()
throws java.io.IOException
java.io.IOExceptionpublic com.fasterxml.jackson.databind.JsonNode getResponseJsonBody()
throws java.io.IOException
java.io.IOExceptionpublic void suppressHeaders()
public java.lang.String getServerVersion()
throws java.io.IOException
java.io.IOExceptionpublic int getBufferSize()
public static java.lang.String buildHttpPath(java.lang.String serverPath,
java.lang.String basePath)
public static void addPathSegment(java.lang.StringBuffer sb,
java.lang.String seg)
Copyright © 2025 MarkLogic Corporation. All Rights Reserved.
Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com