Class WorkerThread.OutputActivity
- java.lang.Object
-
- org.apache.manifoldcf.crawler.system.WorkerThread.CheckActivity
-
- org.apache.manifoldcf.crawler.system.WorkerThread.OutputActivity
-
- All Implemented Interfaces:
IOutputActivity
,IOutputAddActivity
,IOutputCheckActivity
,IOutputHistoryActivity
,IOutputQualifyActivity
,IOutputRemoveActivity
- Enclosing class:
- WorkerThread
protected static class WorkerThread.OutputActivity extends WorkerThread.CheckActivity implements IOutputActivity
The ingest logger class
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
connectionName
protected IRepositoryConnectionManager
connMgr
-
Fields inherited from interface org.apache.manifoldcf.agents.interfaces.IOutputActivity
_rcsid
-
Fields inherited from interface org.apache.manifoldcf.agents.interfaces.IOutputCheckActivity
_rcsid
-
Fields inherited from interface org.apache.manifoldcf.agents.interfaces.IOutputHistoryActivity
CREATED_DIRECTORY, EXCEPTION, EXCLUDED_CONTENT, EXCLUDED_DATE, EXCLUDED_LENGTH, EXCLUDED_MIMETYPE, EXCLUDED_URL, HTTP_ERROR, IOEXCEPTION, UNKNOWN_SECURITY
-
-
Constructor Summary
Constructors Constructor Description OutputActivity(java.lang.String connectionName, IRepositoryConnectionManager connMgr)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
noDocument()
Send NO document via the pipeline to the next output connection.java.lang.String
qualifyAccessToken(java.lang.String authorityNameString, java.lang.String accessToken)
Qualify an access token appropriately, to match access tokens as returned by mod_aa.void
recordActivity(java.lang.Long startTime, java.lang.String activityType, java.lang.Long dataSize, java.lang.String entityURI, java.lang.String resultCode, java.lang.String resultDescription)
Record time-stamped information about the activity of the output connector.int
sendDocument(java.lang.String documentURI, RepositoryDocument document)
Send a document via the pipeline to the next output connection.-
Methods inherited from class org.apache.manifoldcf.crawler.system.WorkerThread.CheckActivity
checkDateIndexable, checkDocumentIndexable, checkLengthIndexable, checkMimeTypeIndexable, checkURLIndexable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.manifoldcf.agents.interfaces.IOutputCheckActivity
checkDateIndexable, checkDocumentIndexable, checkLengthIndexable, checkMimeTypeIndexable, checkURLIndexable
-
-
-
-
Field Detail
-
connectionName
protected final java.lang.String connectionName
-
connMgr
protected final IRepositoryConnectionManager connMgr
-
-
Constructor Detail
-
OutputActivity
public OutputActivity(java.lang.String connectionName, IRepositoryConnectionManager connMgr)
Constructor
-
-
Method Detail
-
recordActivity
public void recordActivity(java.lang.Long startTime, java.lang.String activityType, java.lang.Long dataSize, java.lang.String entityURI, java.lang.String resultCode, java.lang.String resultDescription) throws ManifoldCFException
Record time-stamped information about the activity of the output connector.- Specified by:
recordActivity
in interfaceIOutputHistoryActivity
- Parameters:
startTime
- is either null or the time since the start of epoch in milliseconds (Jan 1, 1970). Every activity has an associated time; the startTime field records when the activity began. A null value indicates that the start time and the finishing time are the same.activityType
- is a string which is fully interpretable only in the context of the connector involved, which is used to categorize what kind of activity is being recorded. For example, a web connector might record a "fetch document" activity. Cannot be null.dataSize
- is the number of bytes of data involved in the activity, or null if not applicable.entityURI
- is a (possibly long) string which identifies the object involved in the history record. The interpretation of this field will differ from connector to connector. May be null.resultCode
- contains a terse description of the result of the activity. The description is limited in size to 255 characters, and can be interpreted only in the context of the current connector. May be null.resultDescription
- is a (possibly long) human-readable string which adds detail, if required, to the result described in the resultCode field. This field is not meant to be queried on. May be null.- Throws:
ManifoldCFException
-
qualifyAccessToken
public java.lang.String qualifyAccessToken(java.lang.String authorityNameString, java.lang.String accessToken) throws ManifoldCFException
Qualify an access token appropriately, to match access tokens as returned by mod_aa. This method includes the authority name with the access token, if any, so that each authority may establish its own token space.- Specified by:
qualifyAccessToken
in interfaceIOutputQualifyActivity
- Parameters:
authorityNameString
- is the name of the authority to use to qualify the access token.accessToken
- is the raw, repository access token.- Returns:
- the properly qualified access token.
- Throws:
ManifoldCFException
-
sendDocument
public int sendDocument(java.lang.String documentURI, RepositoryDocument document) throws ManifoldCFException, ServiceInterruption, java.io.IOException
Send a document via the pipeline to the next output connection.- Specified by:
sendDocument
in interfaceIOutputAddActivity
- Parameters:
documentURI
- is the document's URI.document
- is the document data to be processed (handed to the output data store).- Returns:
- the document status (accepted or permanently rejected); return codes are listed in IPipelineConnector.
- Throws:
java.io.IOException
- only if there's an IO error reading the data from the document.ManifoldCFException
ServiceInterruption
-
noDocument
public void noDocument() throws ManifoldCFException, ServiceInterruption
Send NO document via the pipeline to the next output connection. This is equivalent to sending an empty document placeholder.- Specified by:
noDocument
in interfaceIOutputAddActivity
- Throws:
ManifoldCFException
ServiceInterruption
-
-