public interface Session
Session
defines the interface for a link between an AgentEndpoint
with a MatcherEndpoint
in a
Powermatcher cluster.Modifier and Type | Method and Description |
---|---|
void |
disconnect()
Disconnect the
AgentEndpoint from the MatcherEndpoint . |
java.lang.String |
getAgentId() |
java.lang.String |
getClusterId() |
MarketBasis |
getMarketBasis() |
java.lang.String |
getMatcherId() |
java.lang.String |
getSessionId() |
void |
setMarketBasis(MarketBasis marketBasis)
Sets the
MarketBasis for this session. |
void |
updateBid(BidUpdate newBid)
|
void |
updatePrice(PriceUpdate priceUpdate)
|
java.lang.String getAgentId()
AgentEndpoint
of this Session
.java.lang.String getMatcherId()
MatcherEndpoint
of this Session
.java.lang.String getClusterId()
Session
is active in.java.lang.String getSessionId()
Session
instance.MarketBasis getMarketBasis()
MarketBasis
used in this Session
.void setMarketBasis(MarketBasis marketBasis)
MarketBasis
for this session. This should be set by the MatcherEndpoint
when its
MatcherEndpoint.connectToAgent(Session)
method is called. This makes sure that the AgentEndpoint
knows which MarketBasis
is used for bidding.marketBasis
- the new marketBasis used in this Session
.void updatePrice(PriceUpdate priceUpdate)
PriceUpdate
sent by the MatcherEndpoint
to the AgentEndpoint
of this
Session
. It calls AgentEndpoint.handlePriceUpdate(PriceUpdate)
.priceUpdate
- The PriceUpdate
passed by the MatcherEndpoint
of this Session
.void updateBid(BidUpdate newBid)
newBid
- The Bid
passed by the AgentEndpoint
of this Session
.MatcherEndpoint.handleBidUpdate(Session, BidUpdate)
void disconnect()
AgentEndpoint
from the MatcherEndpoint
. This method should always call both the
AgentEndpoint.matcherEndpointDisconnected(Session)
and the
MatcherEndpoint.agentEndpointDisconnected(Session)
methods.
This method can be called by any object, event the AgentEndpoint
or MatcherEndpoint
themselves.