public class AgentHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AgentHelper.Endpoint
Represents the endpoint for an agent.
|
| Constructor and Description |
|---|
AgentHelper() |
| Modifier and Type | Method and Description |
|---|---|
static String |
agentToString(com.gemstone.gemfire.admin.jmx.Agent agent)
Returns the given agent as a string.
|
static com.gemstone.gemfire.admin.jmx.Agent |
connectAgent()
Connects the agent whose endpoint was created by
createAgent(java.lang.String) to
an admin distributed system, if it is not already connected, but does not
start it. |
static com.gemstone.gemfire.admin.jmx.Agent |
createAgent(String agentConfig)
Creates an unstarted and unconnected agent.
|
static void |
disconnectAgent()
Disconnects the agent if it is connected, leaving the adaptors running.
|
static com.gemstone.gemfire.admin.jmx.Agent |
getAgent()
Returns the current agent if it is created, otherwise null.
|
static AgentDescription |
getAgentDescription(String agentConfig)
Returns the
AgentDescription with the given configuration name
from AgentPrms.names. |
static List |
getEndpoints()
Returns all agent endpoints from the
AgentBlackboard map,
a possibly empty list. |
static com.gemstone.gemfire.admin.jmx.Agent |
startAgent()
Starts the agent whose endpoint was created by
createAgent(java.lang.String), if it
is not already started. |
static com.gemstone.gemfire.admin.jmx.Agent |
startConnectedAgent(String agentConfig)
Creates, starts, and connects an agent using the given agent configuration.
|
static void |
stopAgent()
Stops the agent, if it is running.
|
public static com.gemstone.gemfire.admin.jmx.Agent startConnectedAgent(String agentConfig)
createAgent(String),
startAgent(),
connectAgent()public static com.gemstone.gemfire.admin.jmx.Agent createAgent(String agentConfig)
AgentDescription corresponding to the given agent
configuration from AgentPrms.names.
Upon initial creation, selects a random port and registers the AgentHelper.Endpoint in the AgentBlackboard map for use by tools. Starts
of any agent in this VM will always use this port.
To make modifications before connecting, invoke
To start the agent, use getConfig()/code>
to get the AgentConfig and
invoke its mutator methods.
startAgent(). To connect it, use connectAgent().
HydraRuntimeException - if an attempt is made to reconfigure an
existing agent or there is an exception when creating it.public static com.gemstone.gemfire.admin.jmx.Agent getAgent()
public static com.gemstone.gemfire.admin.jmx.Agent startAgent()
createAgent(java.lang.String), if it
is not already started. This starts the adaptors but does not connect it
to a distributed system. Use connectAgent() to connect the agent.public static void stopAgent()
public static com.gemstone.gemfire.admin.jmx.Agent connectAgent()
createAgent(java.lang.String) to
an admin distributed system, if it is not already connected, but does not
start it. To start the agent, use startAgent().HydraRuntimeException - if the agent has not been created or an
exception occurs when connecting it.public static void disconnectAgent()
stopAgent().public static String agentToString(com.gemstone.gemfire.admin.jmx.Agent agent)
public static AgentDescription getAgentDescription(String agentConfig)
AgentDescription with the given configuration name
from AgentPrms.names.public static List getEndpoints()
AgentBlackboard map,
a possibly empty list. This includes all agents that have ever been
created, regardless of their current status.Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.