public class Target extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Target.TargetStatus |
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CLIENT_REGISTRATION_ID |
static String |
DEFAULT_CREDENTIALS_PROVIDER_COMMAND |
static String |
DEFAULT_HOST |
static String |
DEFAULT_PASSWORD |
static int |
DEFAULT_PORT |
static String |
DEFAULT_PROXY_PASSWORD |
static String |
DEFAULT_PROXY_URI |
static String |
DEFAULT_PROXY_USERNAME |
static String |
DEFAULT_SCHEME |
static String |
DEFAULT_SKIP_SSL_VALIDATION |
static String |
DEFAULT_TARGET |
static String |
DEFAULT_USERNAME |
Constructor and Description |
---|
Target(String targetUriAsString)
Construct a new Target.
|
Target(String targetUriAsString,
String targetUsername,
String targetPassword,
boolean skipSslValidation)
Construct a new Target.
|
Modifier and Type | Method and Description |
---|---|
Target.TargetStatus |
getStatus()
Return the target status, which is either Success or Error.
|
TargetCredentials |
getTargetCredentials()
Returns the target credentials
|
Exception |
getTargetException()
If during targeting an error occurred, the resulting
Exception is made
available for further introspection. |
String |
getTargetResultMessage()
Provides a result message indicating whether the provide
getTargetUri()
was successfully targeted or not. |
URI |
getTargetUri() |
String |
getTargetUriAsString()
Returns the target URI as a String.
|
boolean |
isAuthenticated() |
boolean |
isAuthenticationEnabled()
Indicates whether authentication is enabled for this target.
|
boolean |
isSkipSslValidation()
Returns if sslValidation should be skipped
|
void |
setAuthenticated(boolean authenticated) |
void |
setAuthenticationEnabled(boolean authenticationEnabled) |
void |
setTargetCredentials(TargetCredentials targetCredentials) |
void |
setTargetException(Exception targetException)
Sets the exception in case an error occurred during targeting.
|
void |
setTargetResultMessage(String targetResultMessage)
Set the result messages indicating the success or failure while targeting the
Spring Cloud Data Flow Server.
|
String |
toString() |
public static final String DEFAULT_SCHEME
public static final String DEFAULT_HOST
public static final int DEFAULT_PORT
public static final String DEFAULT_TARGET
public static final String DEFAULT_USERNAME
public static final String DEFAULT_PASSWORD
public static final String DEFAULT_CLIENT_REGISTRATION_ID
public static final String DEFAULT_SKIP_SSL_VALIDATION
public static final String DEFAULT_CREDENTIALS_PROVIDER_COMMAND
public static final String DEFAULT_PROXY_USERNAME
public static final String DEFAULT_PROXY_PASSWORD
public static final String DEFAULT_PROXY_URI
public Target(String targetUriAsString, String targetUsername, String targetPassword, boolean skipSslValidation)
targetUriAsString
String
parameter will be converted to a URI
. This method allows for providing a
username and password for authentication.targetUriAsString
- the data flow server URI, must not be emptytargetUsername
- the username, may be empty, if access is unauthenticatedtargetPassword
- the password, may be emptyskipSslValidation
- whether or not we skip SSL validation.IllegalArgumentException
- if the given URI string violates RFC 2396.public Target(String targetUriAsString)
targetUriAsString
String
parameter will be converted to a URI
.targetUriAsString
- Must not be emptyIllegalArgumentException
- if the given string violates RFC 2396public Target.TargetStatus getStatus()
Target.TargetStatus
. May be null.public Exception getTargetException()
Exception
is made
available for further introspection.public void setTargetException(Exception targetException)
Target.TargetStatus
to Target.TargetStatus.ERROR
.targetException
- Must not be null.public String getTargetResultMessage()
getTargetUri()
was successfully targeted or not.public void setTargetResultMessage(String targetResultMessage)
targetResultMessage
- Must not be empty.public URI getTargetUri()
public String getTargetUriAsString()
public boolean isSkipSslValidation()
public TargetCredentials getTargetCredentials()
public void setTargetCredentials(TargetCredentials targetCredentials)
public boolean isAuthenticationEnabled()
public void setAuthenticationEnabled(boolean authenticationEnabled)
authenticationEnabled
- False by defaultpublic boolean isAuthenticated()
public void setAuthenticated(boolean authenticated)
authenticated
- whether a user is successfully authenticated with the TargetCopyright © 2023 Pivotal Software, Inc.. All rights reserved.