thali/NextGeneration/thaliPeerPool/thaliPeerAction.js
function PeerAction (peerIdentifier, connectionType, actionType, pskIdentity,
                     pskKey)
{
  EventEmitter.call(this);
  this._peerIdentifier = peerIdentifier;
  this._connectionType = connectionType;
  this._actionType = actionType;
  this._pskIdentity = pskIdentity;
  this._pskKey = pskKey;
  this._actionState = PeerAction.actionState.CREATED;
  this._id = peerActionCounter;
  ++peerActionCounter;
}
function PeerAction (peerIdentifier, connectionType, actionType, pskIdentity,
                     pskKey)
{
  EventEmitter.call(this);
  this._peerIdentifier = peerIdentifier;
  this._connectionType = connectionType;
  this._actionType = actionType;
  this._pskIdentity = pskIdentity;
  this._pskKey = pskKey;
  this._actionState = PeerAction.actionState.CREATED;
  this._id = peerActionCounter;
  ++peerActionCounter;
}
function PeerAction ( peerIdentifier , connectionType , actionType , pskIdentity , pskKey ) { EventEmitter . call ( this ) ; this . _peerIdentifier = peerIdentifier ; this . _connectionType = connectionType ; this . _actionType = actionType ; this . _pskIdentity = pskIdentity ; this . _pskKey = pskKey ; this . _actionState = PeerAction . actionState . CREATED ; this . _id = peerActionCounter ; ++ peerActionCounter ; }
This event is emitted synchronously when action state is changed to KILLED.

@event killed
@public
 
An action that has been given to the pool to manage.

When an action is created its state MUST be CREATED.

BugBug: In a sane world we would have limits on how long an action can run
and we would even set up those limits as a config item. But for now we let
each action own the stage for as long as it would like.

@public
@interface PeerAction
@constructor
@fires event:killed
@fires event:started
@param {string} peerIdentifier
@param {module:ThaliMobileNativeWrapper.connectionTypes} connectionType
@param {string} actionType
@param {string} pskIdentity
@param {Buffer} pskKey
This event is emitted synchronously when action state is changed to KILLED .