public class TestRemoteRule extends RemoteRule
RemoteRule.RemoteRequest
circuitBreakers, filterMatches, fixOffsets, inputLogging, lt, premium, ruleLanguage, serviceConfiguration, shutdownRoutines, suppressMisspelledMatch, suppressMisspelledSuggestions, whitespaceNormalisation
Constructor and Description |
---|
TestRemoteRule(Language lang,
RemoteRuleConfig config) |
Modifier and Type | Method and Description |
---|---|
protected Callable<RemoteRuleResult> |
executeRequest(RemoteRule.RemoteRequest request,
long timeoutMilliseconds) |
protected RemoteRuleResult |
fallbackResults(RemoteRule.RemoteRequest request)
fallback if executeRequest times out or throws an error
|
String |
getDescription()
A short description of the error this rule can detect, usually in the language of the text
that is checked.
|
protected RemoteRule.RemoteRequest |
prepareRequest(List<AnalyzedSentence> sentences,
Long textSessionId)
run local preprocessing steps (or just store sentences)
|
circuitBreaker, createCircuitBreaker, fixMatchOffsets, getId, getServiceConfiguration, getTimeout, isPremium, match, run, run, shutdown
addExamplePair, addTags, addToneTags, cacheAntiPatterns, estimateContextForSureMatch, getAntiPatterns, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getDistanceTokens, getErrorTriggeringExamples, getFullId, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getMinPrevMatches, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, hasConfigurableValue, hasTag, hasToneTag, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isGoalSpecific, isOfficeDefaultOff, isOfficeDefaultOn, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setDistanceTokens, setErrorTriggeringExamples, setExamplePair, setGoalSpecific, setIncorrectExamples, setLocQualityIssueType, setMinPrevMatches, setOfficeDefaultOff, setOfficeDefaultOn, setPremium, setTags, setToneTags, setUrl, supportsLanguage, toRuleMatchArray, useInOffice
public TestRemoteRule(Language lang, RemoteRuleConfig config)
protected RemoteRule.RemoteRequest prepareRequest(List<AnalyzedSentence> sentences, Long textSessionId)
RemoteRule
prepareRequest
in class RemoteRule
sentences
- text to processtextSessionId
- session ID for caching, partial rollout, A/B testingprotected Callable<RemoteRuleResult> executeRequest(RemoteRule.RemoteRequest request, long timeoutMilliseconds) throws TimeoutException
executeRequest
in class RemoteRule
request
- returned by prepareRequesttimeoutMilliseconds
- timeout for this operation, <=0 -> unlimitedTimeoutException
- if timeout was exceededprotected RemoteRuleResult fallbackResults(RemoteRule.RemoteRequest request)
RemoteRule
fallbackResults
in class RemoteRule
request
- returned by prepareRequestpublic String getDescription()
Rule
getDescription
in class Rule