|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.parlor.tourney.server.TourniesManager
public abstract class TourniesManager
An extensible tournament manager.
| Field Summary | |
|---|---|
protected com.google.inject.Injector |
_injector
|
protected RootDObjectManager |
_omgr
|
protected int |
_tourneyCount
Count to provide a unique key to tournies as they're created. |
protected Map<Comparable<?>,TourneyManager> |
_tourneys
Holds all the current tournies in the game. |
protected TourneyRepository |
_tournrep
|
| Constructor Summary | |
|---|---|
TourniesManager(Lifecycle cycle)
|
|
| Method Summary | |
|---|---|
void |
createTourney(ClientObject caller,
TourneyConfig config,
InvocationService.ResultListener listener)
Handles a TourniesService.createTourney(com.threerings.parlor.tourney.data.TourneyConfig, com.threerings.presents.client.InvocationService.ResultListener) request. |
protected abstract long |
getIntervalDelay()
Returns the tourney interval delay in milliseconds. |
protected abstract Class<? extends TourneyManager> |
getTourneyManagerClass()
Returns the derivation of TourneyManager to use. |
void |
init()
|
protected void |
loadTourneyConfigs()
Load all the tournament configuration information stored in the repository. |
protected void |
makeTourney(TourneyConfig config,
InvocationService.ResultListener listener)
Called to actually create a tourney once it has been validated and the prize has been reserved. |
protected void |
releaseTourney(Comparable<?> key)
Called by the tourney manager to remove itself from the tournies. |
protected void |
updateTournies()
Called to update loaded tournies, possibly announcing tourney information or start a pending tourney. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int _tourneyCount
protected Map<Comparable<?>,TourneyManager> _tourneys
@Inject protected com.google.inject.Injector _injector
@Inject protected RootDObjectManager _omgr
@Inject protected TourneyRepository _tournrep
| Constructor Detail |
|---|
@Inject public TourniesManager(Lifecycle cycle)
| Method Detail |
|---|
public void init()
init in interface Lifecycle.InitComponent
public void createTourney(ClientObject caller,
TourneyConfig config,
InvocationService.ResultListener listener)
throws InvocationException
TourniesProviderTourniesService.createTourney(com.threerings.parlor.tourney.data.TourneyConfig, com.threerings.presents.client.InvocationService.ResultListener) request.
createTourney in interface TourniesProviderInvocationException
protected void makeTourney(TourneyConfig config,
InvocationService.ResultListener listener)
protected void releaseTourney(Comparable<?> key)
protected void loadTourneyConfigs()
protected void updateTournies()
protected abstract Class<? extends TourneyManager> getTourneyManagerClass()
TourneyManager to use.
protected abstract long getIntervalDelay()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||