|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cuny.cat.GameClient
edu.cuny.cat.MarketClient
public class MarketClient
Main class of a market (specialist) client, used to launch a single such
client. To start a jcat competition simulation with game server and multiple
clients, the Game
class should be used and in this case, MarketClient
is involved but not as a main class.
Parameters
base.auctioneer class, inherits Auctioneer |
the auctioneer regulating the market |
Default Base
market_client |
Nested Class Summary | |
---|---|
protected class |
MarketClient.AskSession
|
protected class |
MarketClient.BidSession
|
protected class |
MarketClient.DayOpenedSession
|
protected class |
MarketClient.DayOpeningSession
|
protected class |
MarketClient.RegisterSession
|
protected class |
MarketClient.ShoutSession
|
protected class |
MarketClient.SubscribeFromClientSession
TODO: currently always return OK, may reject in the future |
protected class |
MarketClient.TransactionProactiveSession
|
Field Summary | |
---|---|
protected Auctioneer |
auctioneer
|
protected boolean |
isPlayTime
|
static java.lang.String |
P_AUCTIONEER
|
static java.lang.String |
P_DEF_BASE
|
protected Specialist |
specialist
this client as Specialist |
Fields inherited from class edu.cuny.cat.GameClient |
---|
clientConnector, clientId, connection, connTrialMax, dispatcher, eventEngine, eventListeners, infrast, logging, P_CONNECTION_TRIAL_MAX, P_ID, P_LOGGING, P_REPORT, P_TYPE, prng, proactiveSessions, reactiveSessions, registry, report, tag, type |
Constructor Summary | |
---|---|
MarketClient()
|
Method Summary | |
---|---|
ClientRegistry |
createRegistry()
|
void |
eventOccurred(AuctionEvent event)
|
void |
eventOccurred(edu.cuny.event.RichEvent event)
The RichEvent -based dispatching mechanism is used
for requesting a transaction and subscription for infomration from
specialists. |
Auctioneer |
getAuctioneer()
|
protected CatpReactiveSession |
getDayOpenedSessionInstance()
|
protected CatpReactiveSession |
getDayOpeningSessionInstance()
|
static void |
main(java.lang.String[] args)
for starting market clients alone, separating from trader clients and server |
protected void |
postTransactionReceived(Transaction transaction)
This method should be implemented by TraderClient and
MarketClient respectively to check the validity of the posted
transaction. |
void |
setAuctioneer(Auctioneer auctioneer)
|
void |
setup(edu.cuny.config.param.ParameterDatabase parameters,
edu.cuny.config.param.Parameter base)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Auctioneer auctioneer
public static final java.lang.String P_DEF_BASE
public static final java.lang.String P_AUCTIONEER
protected boolean isPlayTime
protected Specialist specialist
Specialist
Constructor Detail |
---|
public MarketClient()
Method Detail |
---|
public ClientRegistry createRegistry()
createRegistry
in class GameClient
public void setup(edu.cuny.config.param.ParameterDatabase parameters, edu.cuny.config.param.Parameter base)
setup
in interface edu.cuny.config.param.Parameterizable
setup
in class GameClient
public Auctioneer getAuctioneer()
public void setAuctioneer(Auctioneer auctioneer)
protected CatpReactiveSession getDayOpeningSessionInstance()
getDayOpeningSessionInstance
in class GameClient
protected CatpReactiveSession getDayOpenedSessionInstance()
getDayOpenedSessionInstance
in class GameClient
protected void postTransactionReceived(Transaction transaction)
GameClient
TraderClient
and
MarketClient
respectively to check the validity of the posted
transaction.
postTransactionReceived
in class GameClient
transaction
- the posted transactionpublic static void main(java.lang.String[] args)
args
- public void eventOccurred(edu.cuny.event.RichEvent event)
RichEvent
-based dispatching mechanism is used
for requesting a transaction and subscription for infomration from
specialists.
eventOccurred
in interface edu.cuny.event.RichEventListener
event
- public void eventOccurred(AuctionEvent event)
eventOccurred
in interface AuctionEventListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |