public class Target extends Object
Modifier and Type | Class and Description |
---|---|
class |
Target.Credentials |
static class |
Target.TargetStatus |
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_HOST |
static int |
DEFAULT_PORT |
static String |
DEFAULT_SCHEME |
static String |
DEFAULT_SPECIFIED_PASSWORD |
static String |
DEFAULT_TARGET |
static String |
DEFAULT_UNSPECIFIED_PASSWORD |
static String |
DEFAULT_USERNAME |
Constructor and Description |
---|
Target(String targetUriAsString)
Construct a new Target.
|
Target(String targetUriAsString,
String targetUsername,
String targetPassword)
Construct a new Target.
|
Modifier and Type | Method and Description |
---|---|
Target.TargetStatus |
getStatus()
Return the target status, which is either Success or Error.
|
Target.Credentials |
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.
|
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 XD Admin 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_USERNAME
public static final String DEFAULT_SPECIFIED_PASSWORD
public static final String DEFAULT_UNSPECIFIED_PASSWORD
public static final String DEFAULT_TARGET
public Target(String targetUriAsString, String targetUsername, String targetPassword)
targetUriAsString
String parameter will be converted to a URI
.
This method allows for providing a username and password for authentication.targetUriAsString
- Must not be emptytargetUsername
- May be empty, if access is unauthenticatedtargetPassword
- May be emptyIllegalArgumentException
- if the given 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 String getTargetResultMessage()
getTargetUri()
was successfully targeted or
not.public URI getTargetUri()
public String getTargetUriAsString()
public Target.Credentials getTargetCredentials()
public void setTargetException(Exception targetException)
Target.TargetStatus
to Target.TargetStatus.ERROR
.targetException
- Must not be null.public void setTargetResultMessage(String targetResultMessage)
targetResultMessage
- Must not be empty.Copyright © 2016 Pivotal Software, Inc.. All rights reserved.