com.atlassian.bamboo.agent.bootstrap
Class ClasspathBuilder

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

public final class ClasspathBuilder
extends java.lang.Object

Builds a ClassLoader from the /agentServer/classpath.zip


Method Summary
static java.lang.ClassLoader build(java.io.File home, java.lang.Iterable<java.io.File> classPathDirectories, AgentContext agentContext)
          Builds a ClassLoader from the /agentServer/classpath.zip
static java.util.Set<java.io.File> getRemoteResources(AgentContext agentContext, java.io.File home, java.lang.Iterable<java.io.File> classpathDirectories, java.lang.String resourceName)
          Downloads and extracts the represented by the resource name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

build

public static java.lang.ClassLoader build(java.io.File home,
                                          java.lang.Iterable<java.io.File> classPathDirectories,
                                          AgentContext agentContext)
                                   throws java.io.IOException
Builds a ClassLoader from the /agentServer/classpath.zip

Parameters:
home - of the Remote Agent
classPathDirectories - of the $BAMBOO_AGENT_HOME/classpath directory
agentContext - of the agent
Returns:
classLoader to use to start the agent
Throws:
java.io.IOException - if a network or file system error occurs

getRemoteResources

public static java.util.Set<java.io.File> getRemoteResources(AgentContext agentContext,
                                                             java.io.File home,
                                                             java.lang.Iterable<java.io.File> classpathDirectories,
                                                             java.lang.String resourceName)
                                                      throws java.io.IOException
Downloads and extracts the represented by the resource name

Parameters:
agentContext - used for agent bootstrap
classpathDirectories - directory to extract jars to
resourceName - of the uberjar
Returns:
files to extracted jars
Throws:
java.io.IOException - if any network or file system problems occur


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