Class HttpContent
- java.lang.Object
-
- de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.batch.Request
-
- de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.multipart.HttpContent
-
- All Implemented Interfaces:
Content,MultipartContent
public class HttpContent extends Request implements MultipartContent
- Author:
- scf
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.multipart.MultipartContent
MultipartContent.IsFinished
-
-
Field Summary
-
Fields inherited from class de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.batch.Request
batchVersion, contentId, contentIdValue, data, errors, executeFailed, headersInner, headersOuter, logIndent, method, parseFailed, path, requireContentId, version
-
-
Constructor Summary
Constructors Constructor Description HttpContent(de.fraunhofer.iosb.ilt.frostserver.path.Version batchVersion)HttpContent(de.fraunhofer.iosb.ilt.frostserver.path.Version batchVersion, boolean requireContentId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddData(String data)StringgetContent(boolean allHeaders)Get the String content for response.StringgetContentId()de.fraunhofer.iosb.ilt.frostserver.model.core.IdgetContentIdValue()StringgetData()Get the data in the http request.HttpMethodgetMethod()StringgetPath()Get the path part of the http request.StringgetStatusLine()MultipartContent.IsFinishedisFinished()Gives the parse-state of the Content.voidparseLine(String line)Add the line to the content.voidsetContentId(String contentId)voidsetContentIdValue(de.fraunhofer.iosb.ilt.frostserver.model.core.Id contentIdValue)voidsetStatus(int code, String text)voidsetStatusLine(String statusLine)voidstripLastNewline()Informs the Content that the last newline should be removed again.voidupdateUsingContentIds(List<ContentIdPair> contentIds)-
Methods inherited from class de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.batch.Request
getErrors, getHeaders, getHttpHeaders, getVersion, isExecuteFailed, isParseFailed, parseUrl, setExecuteFailed, setLogIndent, setMethod, setPath
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.batch.Content
getErrors, getHeaders, isParseFailed, setLogIndent
-
-
-
-
Method Detail
-
parseLine
public void parseLine(String line)
Description copied from interface:MultipartContentAdd the line to the content.- Specified by:
parseLinein interfaceMultipartContent- Parameters:
line- The line to add.
-
getPath
public String getPath()
Get the path part of the http request.
-
getData
public String getData()
Get the data in the http request. This does not include the outer headers, command, nor inner headers.
-
getContentId
public String getContentId()
- Overrides:
getContentIdin classRequest
-
setContentId
public void setContentId(String contentId)
- Overrides:
setContentIdin classRequest
-
getContentIdValue
public de.fraunhofer.iosb.ilt.frostserver.model.core.Id getContentIdValue()
- Overrides:
getContentIdValuein classRequest
-
setContentIdValue
public void setContentIdValue(de.fraunhofer.iosb.ilt.frostserver.model.core.Id contentIdValue)
- Overrides:
setContentIdValuein classRequest
-
updateUsingContentIds
public void updateUsingContentIds(List<ContentIdPair> contentIds)
- Overrides:
updateUsingContentIdsin classRequest
-
getMethod
public HttpMethod getMethod()
-
getStatusLine
public String getStatusLine()
-
setStatusLine
public void setStatusLine(String statusLine)
-
getContent
public String getContent(boolean allHeaders)
Description copied from interface:ContentGet the String content for response.- Specified by:
getContentin interfaceContent- Parameters:
allHeaders- flag indicating all headers should be included. If the content is going to be added to a HttpServletResponse, the headers need to be set separately.- Returns:
- The content.
-
stripLastNewline
public void stripLastNewline()
Description copied from interface:MultipartContentInforms the Content that the last newline should be removed again. The newline before a boundary is part of the boundary, not of the content.- Specified by:
stripLastNewlinein interfaceMultipartContent
-
isFinished
public MultipartContent.IsFinished isFinished()
Description copied from interface:MultipartContentGives the parse-state of the Content. This indicates if more content is expected or not.- Specified by:
isFinishedin interfaceMultipartContent- Returns:
- the parse-state of the Content.
-
-