Class Request
- java.lang.Object
-
- de.fraunhofer.iosb.ilt.frostserver.plugin.batchprocessing.batch.Request
-
- All Implemented Interfaces:
Content
- Direct Known Subclasses:
HttpContent,JsonRequest
public abstract class Request extends Object implements Content
Individual request or response inside the bach request.
-
-
Field Summary
Fields Modifier and Type Field Description protected de.fraunhofer.iosb.ilt.frostserver.path.VersionbatchVersionprotected StringcontentIdprotected de.fraunhofer.iosb.ilt.frostserver.model.core.IdcontentIdValueprotected StringBuilderdataprotected List<String>errorsprotected booleanexecuteFailedprotected Map<String,String>headersInnerprotected Map<String,String>headersOuterprotected StringlogIndentprotected HttpMethodmethodprotected booleanparseFailedFlag indicating there is a problem with the syntax of the content.protected Stringpathprotected booleanrequireContentIdprotected Stringversion
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddData(String appended)StringgetContentId()de.fraunhofer.iosb.ilt.frostserver.model.core.IdgetContentIdValue()StringgetData()Get the data in the http request.List<String>getErrors()Get the list of error messages generating during parsing.Map<String,String>getHeaders()Get the headers.Map<String,String>getHttpHeaders()Get the headers of the request inside the batch.HttpMethodgetMethod()StringgetPath()Get the path part of the http request.StringgetVersion()booleanisExecuteFailed()booleanisParseFailed()Flag indicating there were errors parsing the content.voidparseUrl(String fullUrl)voidsetContentId(String contentId)voidsetContentIdValue(de.fraunhofer.iosb.ilt.frostserver.model.core.Id contentIdValue)voidsetExecuteFailed(boolean executeFailed)voidsetLogIndent(String logIndent)Sets the indentation of log messages.voidsetMethod(HttpMethod method)voidsetPath(String path)abstract voidsetStatus(int code, String text)voidupdateUsingContentIds(List<ContentIdPair> contentIds)-
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
getContent
-
-
-
-
Field Detail
-
logIndent
protected String logIndent
-
method
protected HttpMethod method
-
version
protected String version
-
path
protected String path
-
parseFailed
protected boolean parseFailed
Flag indicating there is a problem with the syntax of the content. If this is a changeSet, then the entire changeSet will be discarded.
-
executeFailed
protected boolean executeFailed
-
requireContentId
protected final boolean requireContentId
-
contentId
protected String contentId
-
contentIdValue
protected de.fraunhofer.iosb.ilt.frostserver.model.core.Id contentIdValue
-
data
protected final StringBuilder data
-
batchVersion
protected final de.fraunhofer.iosb.ilt.frostserver.path.Version batchVersion
-
-
Method Detail
-
isParseFailed
public boolean isParseFailed()
Description copied from interface:ContentFlag indicating there were errors parsing the content.- Specified by:
isParseFailedin interfaceContent- Returns:
- true if there were parse errors.
-
isExecuteFailed
public boolean isExecuteFailed()
-
setExecuteFailed
public void setExecuteFailed(boolean executeFailed)
-
getErrors
public List<String> getErrors()
Description copied from interface:ContentGet the list of error messages generating during parsing.
-
getMethod
public HttpMethod getMethod()
-
setMethod
public void setMethod(HttpMethod method)
-
getPath
public String getPath()
Get the path part of the http request.- Returns:
- the URL part of the http request.
-
setPath
public void setPath(String path)
-
getData
public String getData()
Get the data in the http request. This does not include the outer headers, command, nor inner headers.- Returns:
- The data in http request.
-
addData
public void addData(String appended)
-
getContentId
public String getContentId()
-
setContentId
public void setContentId(String contentId)
-
getContentIdValue
public de.fraunhofer.iosb.ilt.frostserver.model.core.Id getContentIdValue()
-
setContentIdValue
public void setContentIdValue(de.fraunhofer.iosb.ilt.frostserver.model.core.Id contentIdValue)
-
getHttpHeaders
public Map<String,String> getHttpHeaders()
Get the headers of the request inside the batch. These are not the same as the batch headers.- Returns:
- the headers of the individual batch request.
-
getHeaders
public Map<String,String> getHeaders()
Description copied from interface:ContentGet the headers. This will include the Content-Type header.- Specified by:
getHeadersin interfaceContent- Returns:
- the headers.
-
getVersion
public String getVersion()
-
setLogIndent
public void setLogIndent(String logIndent)
Description copied from interface:ContentSets the indentation of log messages. Since Content can be nested, this makes debug output better readable.- Specified by:
setLogIndentin interfaceContent- Parameters:
logIndent- the indentation of log messages.
-
updateUsingContentIds
public void updateUsingContentIds(List<ContentIdPair> contentIds)
-
setStatus
public abstract void setStatus(int code, String text)
-
parseUrl
public void parseUrl(String fullUrl)
-
-