Interface Tm1ConnectionDetails
- All Superinterfaces:
org.springframework.boot.autoconfigure.service.connection.ConnectionDetails
public interface Tm1ConnectionDetails
extends org.springframework.boot.autoconfigure.service.connection.ConnectionDetails
How to connect to a TM1 server: the source of truth for the server's auto-configured
session and pool. By default it comes from the server's properties,
tm1.* or
tm1.servers.<name>.*. A bean of yours named <name>Tm1ConnectionDetails
takes its place, for any server. For the default server, so does a bean of yours under
any other name, or @ServiceConnection on a Tm1ServerContainer (with
tm1-spring-boot-testcontainers); see Tm1AutoConfiguration.
A bean of your own for the default server, for credentials the properties can't describe:
// In place of the tm1.* connection properties: a CAM passport, fetched for each login
@Configuration(proxyBeanMethods = false)
static class Tm1Connection {
@Bean
Tm1ConnectionDetails tm1ConnectionDetails(CamPassports passports) {
return new Tm1ConnectionDetails() {
@Override
public String getServiceRoot() {
return "https://tm1.example.com:8010/api/v1/";
}
@Override
public Tm1Authenticator getAuthenticator() {
return Tm1Authenticator.camPassport(passports::current);
}
};
}
}
-
Method Summary
Modifier and TypeMethodDescriptionThe credentials to log in with.The REST API's service root, such ashttp://tm1:8010/api/v1/.default @Nullable org.springframework.boot.ssl.SslBundleThe SSL bundle to connect with, for a server on HTTPS with certificates the JVM doesn't trust by default.
-
Method Details
-
getServiceRoot
String getServiceRoot()The REST API's service root, such ashttp://tm1:8010/api/v1/.- Returns:
- the service root
-
getAuthenticator
-
getSslBundle
default @Nullable org.springframework.boot.ssl.SslBundle getSslBundle()The SSL bundle to connect with, for a server on HTTPS with certificates the JVM doesn't trust by default.- Returns:
- the bundle, or
nullfor the JVM's defaults
-