public class AgentContext extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
APPROVAL_REQUIRED_HEADER |
static String |
BOOTSTRAP_VERSION |
static String |
DISABLE_BOOTSTRAP_UPDATE |
static String |
INSTANCE_FINGERPRINT_PARAM |
static String |
SECURITY_TOKEN_PARAM |
static String |
SERVER_AUTH_POLL_INTERVAL
Server poll interval for authentication, in seconds.
|
static String |
SERVER_FINGERPRINT_PARAM |
static String |
UUID_PARAM |
static String |
VERSION_PARAM |
Constructor and Description |
---|
AgentContext(RemoteAgentHttpClientFactory httpClientFactory,
URL baseUrl,
String fingerPrintRequestSuffix,
AgentType agentBootstrapType,
String securityToken) |
Modifier and Type | Method and Description |
---|---|
static String |
addParameter(String url,
String name,
String value) |
protected String |
createFingerprintUrl(String hostName) |
String |
getAbsoluteURL(String relativeUrl) |
AgentType |
getAgentBootstrapType() |
UUID |
getAgentUuid()
Unique ID for authenticating the agent.
|
URL |
getBaseUrl() |
org.apache.http.client.HttpClient |
getHttpClient() |
long |
getInstanceFingerprint()
A has identifying last restart of Bamboo server.
|
String |
getServerFingerprint()
A hash identifying Bamboo server.
|
Map<String,String> |
getUserProperties() |
protected void |
run() |
static void |
systemExit(String reason,
Throwable throwable)
Shutdown the
AgentContext , as a unrecoverable error has occurred. |
public static final String SERVER_AUTH_POLL_INTERVAL
public static final String SERVER_FINGERPRINT_PARAM
public static final String INSTANCE_FINGERPRINT_PARAM
public static final String VERSION_PARAM
public static final String UUID_PARAM
public static final String SECURITY_TOKEN_PARAM
public static final String DISABLE_BOOTSTRAP_UPDATE
public static final String APPROVAL_REQUIRED_HEADER
public static final String BOOTSTRAP_VERSION
public AgentContext(RemoteAgentHttpClientFactory httpClientFactory, @NotNull URL baseUrl, String fingerPrintRequestSuffix, AgentType agentBootstrapType, @Nullable String securityToken) throws MalformedURLException
MalformedURLException
protected void run() throws ClassNotFoundException, IOException
ClassNotFoundException
IOException
public String getServerFingerprint()
public long getInstanceFingerprint()
public URL getBaseUrl()
public org.apache.http.client.HttpClient getHttpClient()
public AgentType getAgentBootstrapType()
@NotNull public UUID getAgentUuid()
public static void systemExit(@Nullable String reason, @Nullable Throwable throwable)
Shutdown the AgentContext
, as a unrecoverable error has occurred.
reason
- for systemExitthrowable
- The Throwable
that caused the systemExit.Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.