net.sf.freecol.server.model
Class DemandSession

java.lang.Object
  extended by net.sf.freecol.server.model.TransactionSession
      extended by net.sf.freecol.server.model.DemandSession

public class DemandSession
extends TransactionSession

A type of session to handle demanding tribute from a colony.


Field Summary
private  Player demander
          The native player.
private  int gold
          The gold demanded.
private  Goods goods
          The goods demanded.
private static java.util.logging.Logger logger
           
private  int tension
          The tension change if the demand fails.
private  Player victim
          The colony player.
 
Fields inherited from class net.sf.freecol.server.model.TransactionSession
allSessions
 
Constructor Summary
DemandSession(Unit unit, Colony colony)
           
 
Method Summary
 void complete(ChangeSet cs)
          All transaction types must implement a completion action.
 int getGold()
           
 Goods getGoods()
           
 int getTension()
           
 void setGold(int gold)
           
 void setGoods(Goods goods)
           
 void setTension(int tension)
           
 
Methods inherited from class net.sf.freecol.server.model.TransactionSession
clearAll, completeAll, lookup, lookup, makeSessionKey, makeSessionKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final java.util.logging.Logger logger

goods

private Goods goods
The goods demanded.


gold

private int gold
The gold demanded.


tension

private int tension
The tension change if the demand fails.


demander

private Player demander
The native player.


victim

private Player victim
The colony player.

Constructor Detail

DemandSession

public DemandSession(Unit unit,
                     Colony colony)
Method Detail

complete

public void complete(ChangeSet cs)
Description copied from class: TransactionSession
All transaction types must implement a completion action. The last thing they should do is call this to remove reference to this transaction.

Overrides:
complete in class TransactionSession
Parameters:
cs - A ChangeSet to update with changes that occur when completing this session.

getGoods

public Goods getGoods()

setGoods

public void setGoods(Goods goods)

getGold

public int getGold()

setGold

public void setGold(int gold)

getTension

public int getTension()

setTension

public void setTension(int tension)