public class StreamsConnection
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
allowInsecureHosts(boolean allowInsecure)
This function is used to disable checking the trusted certificate chain
and should never be used in production environments
|
static StreamsConnection |
createInstance(java.lang.String userName,
java.lang.String authToken,
java.lang.String url)
Create a connection to IBM Streams REST API.
|
java.util.function.Function<org.apache.http.client.fluent.Executor,java.lang.String> |
getAuthenticator() |
Instance |
getInstance(java.lang.String instanceId)
Gets a specific
instance identified by the instanceId at
this IBM Streams connection |
java.util.List<Instance> |
getInstances()
Gets a list of
instances that are available to this IBM
Streams connection |
boolean |
isVerify() |
static StreamsConnection |
ofAuthenticator(java.lang.String url,
java.util.function.Function<org.apache.http.client.fluent.Executor,java.lang.String> authenticator) |
public static StreamsConnection createInstance(java.lang.String userName, java.lang.String authToken, java.lang.String url)
userName
- String representing the user name to connect to the instance.
If null
user name defaults to value of the environment
variable STREAMS_USERNAME
if set, else the value of
the Java system property user.name
.authToken
- String representing the password to connect to the instance.
If null
password defaults to value of the environment
variable STREAMS_PASSWORD
if set.url
- String representing the root url to the REST API.
If null
url defaults to value of the environment
variable STREAMS_REST_URL
if set.public static StreamsConnection ofAuthenticator(java.lang.String url, java.util.function.Function<org.apache.http.client.fluent.Executor,java.lang.String> authenticator)
public java.util.function.Function<org.apache.http.client.fluent.Executor,java.lang.String> getAuthenticator()
public boolean allowInsecureHosts(boolean allowInsecure)
allowInsecure
- public final boolean isVerify()
public Instance getInstance(java.lang.String instanceId) throws java.io.IOException
instance
identified by the instanceId at
this IBM Streams connectioninstanceId
- name of the instance to be retrievedInstance
java.io.IOException
public java.util.List<Instance> getInstances() throws java.io.IOException
instances
that are available to this IBM
Streams connectionIBM Streams Instances
available to this
connectionjava.io.IOException