public class RemoteAgent extends Object implements AutoCloseable
RemoteAgentRule.
Alternatively it can be created in try-with-resources block or handled manually.
Watch out as it does some unexpected things like removing all local agents from the server.| Constructor and Description |
|---|
RemoteAgent() |
RemoteAgent(BambooEnvironmentData bambooEnvironmentData) |
RemoteAgent(BambooEnvironmentData bambooEnvironmentData,
boolean startImmediately) |
RemoteAgent(BambooEnvironmentData bambooEnvironmentData,
boolean startImmediately,
boolean tearDownLocalAgents) |
RemoteAgent(boolean tearDownLocalAgents) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
File |
getAgentExecutionDirectory()
Get remote agent installation directory
|
File |
getAgentHomeDirectory()
Get remote agent home directory
|
long |
getAgentId()
Get remote agent id
|
void |
restartAgent()
Restarts the agent.
|
void |
setLogsFolderName(@Nullable String logsFolderName)
Set log folder name.
|
void |
startAgent()
Start remote agent if it's not started yet
|
void |
stopAgent()
Stops the remote agent
|
public RemoteAgent(BambooEnvironmentData bambooEnvironmentData) throws Exception
Exceptionpublic RemoteAgent(BambooEnvironmentData bambooEnvironmentData, boolean startImmediately, boolean tearDownLocalAgents) throws Exception
Exceptionpublic RemoteAgent(BambooEnvironmentData bambooEnvironmentData, boolean startImmediately) throws Exception
Exceptionpublic void close()
throws Exception
close in interface AutoCloseableExceptionpublic void startAgent()
throws Exception
Exceptionpublic void restartAgent()
throws Exception
Exceptionpublic void setLogsFolderName(@Nullable
@Nullable String logsFolderName)
REMOTE_AGENT_LOGS_DIRECTORY system property
is not empty.logsFolderName - public File getAgentHomeDirectory()
public File getAgentExecutionDirectory()
public long getAgentId()
Copyright © 2023 Atlassian Software Systems Pty Ltd. All rights reserved.