public static class BaseAgentEndpoint.Connected extends java.lang.Object implements AgentEndpoint.Status
BaseAgentEndpoint.Connected
object describes the current status and configuration of an AgentEndpoint
. This
status can be queried through the Agent.getStatus()
method and will give a snapshot of the state at that
time.Constructor and Description |
---|
BaseAgentEndpoint.Connected(Session session)
Creates a new
BaseAgentEndpoint.Connected object. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getClusterId() |
MarketBasis |
getMarketBasis() |
Session |
getSession() |
boolean |
isConnected()
For a agent to be connect, the
Agent.setContext(FlexiblePowerContext) has been called and the agent has
been configured with a clusterId (and usually a market basis). |
public BaseAgentEndpoint.Connected(Session session)
BaseAgentEndpoint.Connected
object.session
- the current Session
of the AgentEndpoint
.public java.lang.String getClusterId()
getClusterId
in interface Agent.Status
Agent
parent.public MarketBasis getMarketBasis()
getMarketBasis
in interface Agent.Status
MarketBasis
on which this Agent
is running and basing its Bid
s
and Price
s.public Session getSession()
getSession
in interface AgentEndpoint.Status
Session
for the connection from this AgentEndpoint
to the
MatcherEndpoint
.public boolean isConnected()
Agent.Status
Agent.setContext(FlexiblePowerContext)
has been called and the agent has
been configured with a clusterId (and usually a market basis). Only if this is true
should the
agent be used normally.
For an AgentEndpoint
this means that it has been connected through a Session
. For a
MatcherEndpoint
is can be connected simply by having a MarketBasis
configured (e.g. for an
Auctioneer).isConnected
in interface Agent.Status
true
when the agent is connected to the cluster.