Packagecom.adobe.photoshop.connection
Classpublic class TransactionManager
InheritanceTransactionManager Inheritance Object

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 10

The TransactionManager is a class that makes it easy to always grab the next transaction ID. It can be used in a singleton pattern. You may manage transaction IDs yourself, but the API uses this class, and it will then be up to your application to not create IDs that conflict with the APIs requests. This may become particularly tricky if you also use the API's SubscriptionManager. If you send requests with your own transaction IDs and Photoshop responds with those IDs, it's possible you could trigger the SubscriptionManager for any active subscriptions, leading to undetermined behavior (probably parsing errors or SubscriptionEvents with confusing data).



Public Properties
 PropertyDefined By
  inst : TransactionManager
[static] The instance of the TransactionManager
TransactionManager
  transactionID : int
[write-only] Sets the transaction ID, overriding the internal counter.
TransactionManager
Public Methods
 MethodDefined By
  
Creates a new TransactionManager, and sets the internal transaction counter to 0
TransactionManager
  
destroy():void
Cleans up this instance of the TransactionManager
TransactionManager
  
Gets the current transaction ID.
TransactionManager
  
[static] Gets a singleton reference to a global transaction manager.
TransactionManager
  
Gets the next available transaction ID.
TransactionManager
Property Detail
instproperty
public static var inst:TransactionManager

The instance of the TransactionManager

transactionIDproperty 
transactionID:int  [write-only]

Sets the transaction ID, overriding the internal counter.


Implementation
    public function set transactionID(value:int):void
Constructor Detail
TransactionManager()Constructor
public function TransactionManager()

Creates a new TransactionManager, and sets the internal transaction counter to 0

Method Detail
destroy()method
public function destroy():void

Cleans up this instance of the TransactionManager

getCurrentTransactionID()method 
public function getCurrentTransactionID():int

Gets the current transaction ID. In many cases, this ID will represent a message that's already been sent.

Returns
int — The current ID
getInstance()method 
public static function getInstance():TransactionManager

Gets a singleton reference to a global transaction manager.

Returns
TransactionManager — A global, singleton-pattern TransactionManager instance
getNextTransactionID()method 
public function getNextTransactionID():int

Gets the next available transaction ID.

Returns
int — The next transaction ID that can be used