Package io.vrap.rmf.base.client
Class SolutionInfo
java.lang.Object
io.vrap.rmf.base.client.SolutionInfo
- All Implemented Interfaces:
ModelBase
- Direct Known Subclasses:
DatadogSolutionInfo
,NewRelicSolutionInfo
,OpenTelemetrySolutionInfo
Marker interface to generate a solution info for the Java SDK user agent.
A User-Agent header with a solution information looks like this:
commercetools-sdk-java-v2/1.4.1 Java/1.8.0_92-b14 (Mac OS X; x86_64) SOLUTION_NAME/SOLUTION_VERSION (+https://website.tld; +info@SOLUTION.com)
To add a solution information to the Java SDK create a resource file src/main/resources/META-INF/services/io.vrap.rmf.base.client.SolutionInfo
which contains a fully qualified class name like (replace at least SOLUTION with your solution name)
tld.SOLUTION.client.SOLUTIONSolutionInfo
tld.SOLUTION.client.SOLUTIONSolutionInfo
:
public class SOLUTIONSolutionInfo extends SolutionInfo {
public SOLUTIONSolutionInfo() {
setName("Java-SDK-integration-tests");
setVersion(BuildInfo.version());
setWebsite("https://github.com/commercetools/commercetools-sdk-java-v2");
setEmergencyContact("helpdesk@commercetools.com");
}
}
This class will be loaded via reflection.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
void
setEmergencyContact
(String emergencyContact) void
void
setVersion
(String version) void
setWebsite
(String website) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
SolutionInfo
public SolutionInfo()
-
-
Method Details
-
getName
-
setName
-
getVersion
-
setVersion
-
getWebsite
-
setWebsite
-
getEmergencyContact
-
setEmergencyContact
-