com.atlassian.bamboo.agent.bootstrap
Class AgentContext

java.lang.Object
  extended by com.atlassian.bamboo.agent.bootstrap.AgentContext

public class AgentContext
extends java.lang.Object


Field Summary
static java.lang.String BOOTSTRAP_VERSION
           
static java.lang.String DISABLE_BOOTSTRAP_UPDATE
           
static java.lang.String FINGERPRINT_PARAM
           
static java.lang.String SERVER_AUTH_POLL_INTERVAL
          Server poll interval for authentication, in seconds.
static java.lang.String UUID_PARAM
           
static java.lang.String VERSION_PARAM
           
 
Constructor Summary
AgentContext(org.apache.commons.httpclient.HttpClient httpClient, java.net.URL baseUrl, java.lang.String fingerPrintRequestSuffix, AgentType agentBootstrapType)
           
 
Method Summary
static java.lang.String addParameter(java.lang.String url, java.lang.String name, java.lang.String value)
           
 java.lang.String getAbsoluteURL(java.lang.String relativeUrl)
           
 AgentType getAgentBootstrapType()
           
 java.util.UUID getAgentUuid()
          Unique ID for authenticating the agent.
 java.net.URL getBaseUrl()
           
 java.lang.String getFingerprint()
           
 org.apache.commons.httpclient.HttpClient getHttpClient()
           
 java.util.Map<java.lang.String,java.lang.String> getUserProperties()
           
protected  void run()
           
static void systemExit(java.lang.String reason, java.lang.Throwable throwable)
          Shutdown the AgentContext, as a unrecoverable error has occurred.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_AUTH_POLL_INTERVAL

public static final java.lang.String SERVER_AUTH_POLL_INTERVAL
Server poll interval for authentication, in seconds.

See Also:
Constant Field Values

FINGERPRINT_PARAM

public static final java.lang.String FINGERPRINT_PARAM
See Also:
Constant Field Values

VERSION_PARAM

public static final java.lang.String VERSION_PARAM
See Also:
Constant Field Values

UUID_PARAM

public static final java.lang.String UUID_PARAM
See Also:
Constant Field Values

DISABLE_BOOTSTRAP_UPDATE

public static final java.lang.String DISABLE_BOOTSTRAP_UPDATE
See Also:
Constant Field Values

BOOTSTRAP_VERSION

public static final java.lang.String BOOTSTRAP_VERSION
See Also:
Constant Field Values
Constructor Detail

AgentContext

public AgentContext(org.apache.commons.httpclient.HttpClient httpClient,
                    java.net.URL baseUrl,
                    java.lang.String fingerPrintRequestSuffix,
                    AgentType agentBootstrapType)
             throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException
Method Detail

run

protected void run()
            throws java.lang.ClassNotFoundException,
                   java.io.IOException
Throws:
java.lang.ClassNotFoundException
java.io.IOException

getFingerprint

public java.lang.String getFingerprint()

getBaseUrl

public java.net.URL getBaseUrl()
Returns:
base url for bootstrap
Since:
3.3

getAbsoluteURL

public java.lang.String getAbsoluteURL(java.lang.String relativeUrl)

addParameter

public static java.lang.String addParameter(java.lang.String url,
                                            java.lang.String name,
                                            java.lang.String value)

getHttpClient

public org.apache.commons.httpclient.HttpClient getHttpClient()

getUserProperties

public java.util.Map<java.lang.String,java.lang.String> getUserProperties()

getAgentBootstrapType

public AgentType getAgentBootstrapType()
Returns:
type of agent bootstrap
Since:
3.3

getAgentUuid

public java.util.UUID getAgentUuid()
Unique ID for authenticating the agent.

Returns:
unique agent ID

systemExit

public static void systemExit(@Nullable
                              java.lang.String reason,
                              @Nullable
                              java.lang.Throwable throwable)

Shutdown the AgentContext, as a unrecoverable error has occurred.

Parameters:
reason - for systemExit
throwable - The Throwable that caused the systemExit.


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.