@Service
public class EventHandlerFactory
extends java.lang.Object
| Constructor | Description |
|---|---|
EventHandlerFactory() |
| Modifier and Type | Method | Description |
|---|---|---|
IAttackListener |
getAttackListener(ch.sahits.game.openpatrician.model.ship.IShip ship,
PatrolInternalState state) |
Get the attack listener for a standard patrol.
|
ch.sahits.game.openpatrician.display.event.handler.impl.DeliverPackages |
getDeliverPackagesHandler(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.ship.IShip ship,
java.time.LocalDateTime deadline,
int premium,
int amount) |
Retrieve the event handler for delivering packages
|
NextCourierPatrolStation |
getNextCourierPatrolStationHanlder(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
CourierPatrolStateInternal state,
ch.sahits.game.openpatrician.model.IPlayer player,
java.time.LocalDateTime deadline) |
Retrieve the event handler for the next patrol station
|
ch.sahits.game.openpatrician.display.event.handler.impl.NextPatrolStation |
getNextPatrolStateion(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
PatrolInternalState state,
ch.sahits.game.openpatrician.model.IPlayer player,
java.time.LocalDateTime deadline,
IAttackListener atackListener) |
Retrieve the next patrol station event listener
|
ch.sahits.game.openpatrician.display.event.handler.impl.PassengerLeavesShipOnArrival |
getPassengerLeavingOnShipArrivalHandler(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer shipsOwner,
java.time.LocalDateTime deadline,
ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType dialogType,
ch.sahits.game.openpatrician.clientserverinterface.service.DialogTemplateParameterSupplier dialogParameterSupplier,
ch.sahits.game.openpatrician.clientserverinterface.service.LinearDeadlinePremiumCalculator premiumCalculator) |
Event handler for a passenger leaving the ship in a city
|
ShipArrivalForLoading |
getShipArrivalForLoadingHandler(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer player,
java.time.LocalDateTime deadline,
int requiredAmount,
int premium) |
|
SinkConcurrentsShipOrder |
getSinkConcurrentsShipOrder(ch.sahits.game.openpatrician.model.IPlayer opponent,
ch.sahits.game.openpatrician.model.IPlayer player,
int offerdTime,
int premium,
ch.sahits.game.openpatrician.model.event.TimedTask reconciliation) |
Retrieve the concurrent ship order
|
UnloadOnArival |
getUnloadOnArrivalHandler(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
int loadedAmount) |
Create the handler for unloading anonymous ware and register it with the event bus.
|
ch.sahits.game.openpatrician.display.event.handler.impl.ViewChangeActionRunnable |
getViewChangeActionRunnable(ch.sahits.game.openpatrician.javafx.model.EDialogType selected) |
Retrieve the event handler for a new view change runnable.
|
ViewChangeDialogTemplateRunnable |
getViewChangeActionRunnable(ch.sahits.game.openpatrician.model.ui.DialogTemplate template) |
Retrieve the event handler for a new dialog based on a template
|
java.lang.Runnable |
getViewChangeActionRunnable(ch.sahits.game.openpatrician.model.ui.IDialogState state) |
Retrieve the event handler for a new dialog based on a state
|
public ch.sahits.game.openpatrician.display.event.handler.impl.DeliverPackages getDeliverPackagesHandler(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.ship.IShip ship,
java.time.LocalDateTime deadline,
int premium,
int amount)
city - to which should be deliveredship - that deliversdeadline - until the delivery has to take placepublic ShipArrivalForLoading getShipArrivalForLoadingHandler(ch.sahits.game.openpatrician.model.city.ICity city, ch.sahits.game.openpatrician.model.IPlayer player, java.time.LocalDateTime deadline, int requiredAmount, int premium)
public ch.sahits.game.openpatrician.display.event.handler.impl.PassengerLeavesShipOnArrival getPassengerLeavingOnShipArrivalHandler(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer shipsOwner,
java.time.LocalDateTime deadline,
ch.sahits.game.openpatrician.clientserverinterface.service.EDialogTemplateType dialogType,
ch.sahits.game.openpatrician.clientserverinterface.service.DialogTemplateParameterSupplier dialogParameterSupplier,
ch.sahits.game.openpatrician.clientserverinterface.service.LinearDeadlinePremiumCalculator premiumCalculator)
ship - that is leftcity - destinationshipsOwner - owner of the shipdeadline - after which the passenger leaves without premiumdialogType - enum type identifying the dialog that is to be created.dialogParameterSupplier - supplier function providing the arguments for the dialog template.premiumCalculator - supplier lambda function to calculate the premium to be payed upon arrival.public UnloadOnArival getUnloadOnArrivalHandler(ch.sahits.game.openpatrician.model.ship.IShip ship, ch.sahits.game.openpatrician.model.city.ICity city, int loadedAmount)
ship - ship that has the ware loadedcity - into which the ship should arriveloadedAmount - amount of anonymous ware loaded.public NextCourierPatrolStation getNextCourierPatrolStationHanlder(ch.sahits.game.openpatrician.model.ship.IShip ship, ch.sahits.game.openpatrician.model.city.ICity city, CourierPatrolStateInternal state, ch.sahits.game.openpatrician.model.IPlayer player, java.time.LocalDateTime deadline)
ship - that is on patrolcity - next citystate - patrol stateplayer - for which to create the next courier patrol stationdeadline - until the patrol has to reach the citypublic ch.sahits.game.openpatrician.display.event.handler.impl.ViewChangeActionRunnable getViewChangeActionRunnable(ch.sahits.game.openpatrician.javafx.model.EDialogType selected)
selected - notice item that is selected.public ViewChangeDialogTemplateRunnable getViewChangeActionRunnable(ch.sahits.game.openpatrician.model.ui.DialogTemplate template)
template - dialog template to inject into the view changablepublic java.lang.Runnable getViewChangeActionRunnable(ch.sahits.game.openpatrician.model.ui.IDialogState state)
state - dialog state for the vhiew change dialog runnablepublic IAttackListener getAttackListener(ch.sahits.game.openpatrician.model.ship.IShip ship, PatrolInternalState state)
ship - doing the patrolstate - patrol statepublic ch.sahits.game.openpatrician.display.event.handler.impl.NextPatrolStation getNextPatrolStateion(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
PatrolInternalState state,
ch.sahits.game.openpatrician.model.IPlayer player,
java.time.LocalDateTime deadline,
IAttackListener atackListener)
ship - doing the patrrolcity - next citystate - current stateplayer - for which to create the next patrol stationdeadline - until when the city has to be reachedatackListener - listener for attackspublic SinkConcurrentsShipOrder getSinkConcurrentsShipOrder(ch.sahits.game.openpatrician.model.IPlayer opponent, ch.sahits.game.openpatrician.model.IPlayer player, int offerdTime, int premium, ch.sahits.game.openpatrician.model.event.TimedTask reconciliation)
opponent - playerplayer - the order executorofferdTime - time to execute the taskpremium - on successful executionreconciliation - timer task for the reconcialiationCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.