public class HttpPoster
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
HttpPoster.CodeDetails
Code+details paper object
|
protected class |
HttpPoster.DeleteThread
Killable thread that does deletions.
|
protected class |
HttpPoster.IngestThread
Killable thread that does ingestions.
|
protected static class |
HttpPoster.LaxTrustManager
Our own trust manager, which ignores certificate issues
|
protected class |
HttpPoster.StatusThread
Killable thread that does a status check.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
_rcsid |
protected static int |
HEADER_CHUNK |
static java.lang.String |
ingestBufferSizeProperty
Ingestion buffer size property.
|
static java.lang.String |
ingestCredentialsRealm |
static java.lang.String |
ingestMaxConnectionsProperty |
static java.lang.String |
ingestPasswordProperty |
static java.lang.String |
ingestRescheduleInterval |
static java.lang.String |
ingestResponseRetryCount |
static java.lang.String |
ingestResponseRetryInterval |
static java.lang.String |
ingestURIProperty |
static java.lang.String |
ingestUserProperty |
protected static javax.net.ssl.SSLSocketFactory |
secureSocketFactory
This is the secure socket factory we will use.
|
| Constructor and Description |
|---|
HttpPoster(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
java.lang.String realm,
java.lang.String userID,
java.lang.String password,
java.lang.String postURI)
Initialized the http poster.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkPost()
Post a check request.
|
protected java.net.Socket |
createSocket(long responseRetryCount)
Create a socket in a manner consistent with all of our specified parameters.
|
void |
deletePost(java.lang.String documentURI,
org.apache.manifoldcf.agents.interfaces.IOutputRemoveActivity activities)
Post a delete request.
|
protected java.lang.String |
getResponse(java.io.BufferedReader stream)
Get the response code of the post
|
protected static javax.net.ssl.SSLSocketFactory |
getSecureSocketFactory()
Build a secure socket factory based on no keystore and a lax trust manager.
|
boolean |
indexPost(java.lang.String documentURI,
java.util.List<java.lang.String> collections,
java.lang.String documentTemplate,
java.lang.String authorityNameString,
org.apache.manifoldcf.agents.interfaces.RepositoryDocument document,
org.apache.manifoldcf.agents.interfaces.IOutputAddActivity activities)
Post the input stream to ingest
|
protected static java.lang.String |
metadataEncode(java.lang.String inputString)
Encode for metadata.
|
protected static void |
writeACLs(java.lang.StringBuilder aclXml,
java.lang.String type,
java.lang.String[] acl,
java.lang.String[] denyAcl,
java.lang.String authorityNameString,
org.apache.manifoldcf.agents.interfaces.IOutputAddActivity activities)
Write acls into a StringBuilder
|
protected void |
writeCredentials(java.io.OutputStream out)
Write credentials to output
|
public static final java.lang.String _rcsid
public static java.lang.String ingestBufferSizeProperty
public static java.lang.String ingestCredentialsRealm
public static java.lang.String ingestResponseRetryCount
public static java.lang.String ingestResponseRetryInterval
public static java.lang.String ingestRescheduleInterval
public static java.lang.String ingestURIProperty
public static java.lang.String ingestUserProperty
public static java.lang.String ingestPasswordProperty
public static java.lang.String ingestMaxConnectionsProperty
protected static final int HEADER_CHUNK
protected static javax.net.ssl.SSLSocketFactory secureSocketFactory
public HttpPoster(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
java.lang.String realm,
java.lang.String userID,
java.lang.String password,
java.lang.String postURI)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
userID - is the unencoded user name, or null.password - is the unencoded password, or null.postURI - the uri to post the request toorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic boolean indexPost(java.lang.String documentURI,
java.util.List<java.lang.String> collections,
java.lang.String documentTemplate,
java.lang.String authorityNameString,
org.apache.manifoldcf.agents.interfaces.RepositoryDocument document,
org.apache.manifoldcf.agents.interfaces.IOutputAddActivity activities)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
documentURI - is the document's uri.document - is the document structure to ingest.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionprotected static void writeACLs(java.lang.StringBuilder aclXml,
java.lang.String type,
java.lang.String[] acl,
java.lang.String[] denyAcl,
java.lang.String authorityNameString,
org.apache.manifoldcf.agents.interfaces.IOutputAddActivity activities)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic void checkPost()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionpublic void deletePost(java.lang.String documentURI,
org.apache.manifoldcf.agents.interfaces.IOutputRemoveActivity activities)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
documentURI - is the document's URI.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionprotected java.lang.String getResponse(java.io.BufferedReader stream)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
stream - the stream the response is going to come fromorg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionprotected void writeCredentials(java.io.OutputStream out)
throws java.io.IOException
java.io.IOExceptionprotected static java.lang.String metadataEncode(java.lang.String inputString)
inputString - is the input string.protected static javax.net.ssl.SSLSocketFactory getSecureSocketFactory()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected java.net.Socket createSocket(long responseRetryCount)
throws java.io.IOException,
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFException