Package org.powertac.common.msg
Class BrokerAuthentication
- java.lang.Object
-
- org.powertac.common.msg.BrokerAuthentication
-
@Domain public class BrokerAuthentication extends Object
This message is used for authenticating a broker with the server. Broker sends this message to the server with its username, password, and the name of the queue through which it wishes to receive messages. The password is ignored by a standalone server; in a tournament situation it is the game-token received from the tournament manager. The queue name may be the username, but in a tournament situation using some sort of difficult-to-guess hash (or possibly the game token) will make it more difficult (but not impossible) for other brokers to intercept its messages. If the login is accepted, aBrokerAccept
message is returned.- Author:
- John Collins
-
-
Constructor Summary
Constructors Constructor Description BrokerAuthentication(String username, String password)
Creates an instance from a username, passwordBrokerAuthentication(Broker broker)
Creates an instance from a broker
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getBrokerTime()
Returns the system time set by the broker.String
getPassword()
String
getUsername()
void
setBrokerTime(long time)
Sets the system time.
-
-
-
Method Detail
-
getUsername
public String getUsername()
- Returns:
- the broker username
-
getPassword
public String getPassword()
- Returns:
- the password
-
setBrokerTime
public void setBrokerTime(long time)
Sets the system time. Should be set immediately before sending the message to the server.
-
getBrokerTime
public long getBrokerTime()
Returns the system time set by the broker. Used by the server to estimate clock offset.
-
-