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.IOException
public int write(byte[] bytes) throws java.io.IOException
java.io.IOException
public void writeString(java.lang.String value) throws java.io.IOException
java.io.IOException
public void write(java.nio.ByteBuffer buffer) throws java.io.IOException
java.io.IOException
public java.io.InputStream getResponseStream() throws java.io.IOException
java.io.IOException
public 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.IOException
public java.util.List<java.lang.String> getResponseHeaders(java.lang.String headerName) throws java.io.IOException
java.io.IOException
public int getResponseCode() throws java.io.IOException
java.io.IOException
public java.lang.String getResponseMessage() throws java.io.IOException
java.io.IOException
public int getResponseContentLength() throws java.io.IOException
java.io.IOException
public java.lang.String getResponseContentType() throws java.io.IOException
java.io.IOException
public java.lang.String getResponseContentTypeField(java.lang.String fieldName) throws java.io.IOException
java.io.IOException
public java.lang.String getResponseContentBoundary() throws java.io.IOException
java.io.IOException
public java.lang.String getReponseCookieValue(java.lang.String key) throws java.io.IOException
java.io.IOException
public boolean isResponseChunked() throws java.io.IOException
java.io.IOException
public long getResponseHeaderRecvTime() throws java.io.IOException
java.io.IOException
public long getResponseKeepaliveExpireTime() throws java.io.IOException
java.io.IOException
public int getResponseKeepaliveSeconds() throws java.io.IOException
java.io.IOException
public java.lang.String getResponseConnection() throws java.io.IOException
java.io.IOException
public com.fasterxml.jackson.databind.JsonNode getResponseJsonBody() throws java.io.IOException
java.io.IOException
public void suppressHeaders()
public java.lang.String getServerVersion() throws java.io.IOException
java.io.IOException
public 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 © 2024 MarkLogic
Corporation
Complete online documentation for MarkLogic Server,
XQuery and related components may
be found at
developer.marklogic.com