public class Target
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
Target.Credentials |
static class |
Target.TargetStatus |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_HOST |
static int |
DEFAULT_PORT |
static java.lang.String |
DEFAULT_SCHEME |
static java.lang.String |
DEFAULT_SPECIFIED_PASSWORD |
static java.lang.String |
DEFAULT_TARGET |
static java.lang.String |
DEFAULT_UNSPECIFIED_PASSWORD |
static java.lang.String |
DEFAULT_USERNAME |
Constructor and Description |
---|
Target(java.lang.String targetUriAsString)
Construct a new Target.
|
Target(java.lang.String targetUriAsString,
java.lang.String targetUsername,
java.lang.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
|
java.lang.Exception |
getTargetException()
If during targeting an error occurred, the resulting
Exception is made available for further
introspection. |
java.lang.String |
getTargetResultMessage()
Provides a result message indicating whether the provide
getTargetUri() was successfully targeted or
not. |
java.net.URI |
getTargetUri() |
java.lang.String |
getTargetUriAsString()
Returns the target URI as a String.
|
void |
setTargetException(java.lang.Exception targetException)
Sets the exception in case an error occurred during targeting.
|
void |
setTargetResultMessage(java.lang.String targetResultMessage)
Set the result messages indicating the success or failure while targeting the Spring XD Admin Server.
|
java.lang.String |
toString() |
public static final java.lang.String DEFAULT_SCHEME
public static final java.lang.String DEFAULT_HOST
public static final int DEFAULT_PORT
public static final java.lang.String DEFAULT_USERNAME
public static final java.lang.String DEFAULT_SPECIFIED_PASSWORD
public static final java.lang.String DEFAULT_UNSPECIFIED_PASSWORD
public static final java.lang.String DEFAULT_TARGET
public Target(java.lang.String targetUriAsString, java.lang.String targetUsername, java.lang.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 emptyjava.lang.IllegalArgumentException
- if the given string violates RFC 2396.public Target(java.lang.String targetUriAsString)
targetUriAsString
String parameter will be converted to a URI
.targetUriAsString
- Must not be emptyjava.lang.IllegalArgumentException
- if the given string violates RFC 2396public Target.TargetStatus getStatus()
Target.TargetStatus
. May be null.public java.lang.Exception getTargetException()
Exception
is made available for further
introspection.public java.lang.String getTargetResultMessage()
getTargetUri()
was successfully targeted or
not.public java.net.URI getTargetUri()
public java.lang.String getTargetUriAsString()
public Target.Credentials getTargetCredentials()
public void setTargetException(java.lang.Exception targetException)
Target.TargetStatus
to Target.TargetStatus.ERROR
.targetException
- Must not be null.public void setTargetResultMessage(java.lang.String targetResultMessage)
targetResultMessage
- Must not be empty.public java.lang.String toString()
toString
in class java.lang.Object