| Package | com.whirled.contrib.persist |
| Class | public class CookieManager |
| Inheritance | CookieManager flash.events.EventDispatcher |
| Property | Defined by | ||
|---|---|---|---|
| loaded : Boolean [read-only]
| CookieManager | ||
| Property | Defined by | ||
|---|---|---|---|
| _cookieFactory : CookieFactory | CookieManager | ||
| _debug : Boolean | CookieManager | ||
| _gameCtrl : GameControl | CookieManager | ||
| _lastWrite : int = 0 | CookieManager | ||
| _loaded : Boolean = false | CookieManager | ||
| _playerId : int | CookieManager | ||
| _properties : Map | CookieManager | ||
| _propertyDefaults : Map | CookieManager | ||
| _receivedUpdates : Boolean = false | CookieManager | ||
| _stopped : Boolean = false | CookieManager | ||
| _timer : Timer = null | CookieManager | ||
| Method | Defined by | ||
|---|---|---|---|
|
CookieManager(gameCtrl:GameControl, properties:Map, cookieFactory:CookieFactory, playerId:int = 0, debugLogging:Boolean = false)
| CookieManager | ||
|
cookiePropertyUpdated(... ignored):void
| CookieManager | ||
|
getProperty(name:String):CookieProperty
| CookieManager | ||
|
resumeWrites():void
Will allow cookie updates to cause a write to the server cookie once again.
| CookieManager | ||
|
stopWrites():void
| CookieManager | ||
| Method | Defined by | ||
|---|---|---|---|
|
dispatchLoaded():void
| CookieManager | ||
|
gotCookie(cookie:Object, occupantId:int):void
| CookieManager | ||
|
readBytes(bytes:ByteArray):void
| CookieManager | ||
|
writeBytes(bytes:ByteArray):void
| CookieManager | ||
|
writeCookie(... ignored):void
| CookieManager | ||
| Constant | Defined by | ||
|---|---|---|---|
| log : Log [static]
| CookieManager | ||
| VERSION : int = 2 [static] Version bumps are not required when adding new data types.
| CookieManager | ||
| WRITE_DELAY : int = 2000 [static] Write out the cookie at most every 2 seconds, in order to prevent this manager from
sucking up network resources
| CookieManager | ||
| _cookieFactory | property |
protected var _cookieFactory:CookieFactory
| _debug | property |
protected var _debug:Boolean
| _gameCtrl | property |
protected var _gameCtrl:GameControl
| _lastWrite | property |
protected var _lastWrite:int = 0
| _loaded | property |
protected var _loaded:Boolean = false
| loaded | property |
loaded:Boolean [read-only]Implementation
public function get loaded():Boolean
| _playerId | property |
protected var _playerId:int
| _properties | property |
protected var _properties:Map
| _propertyDefaults | property |
protected var _propertyDefaults:Map
| _receivedUpdates | property |
protected var _receivedUpdates:Boolean = false
| _stopped | property |
protected var _stopped:Boolean = false
| _timer | property |
protected var _timer:Timer = null
| CookieManager | () | constructor |
public function CookieManager(gameCtrl:GameControl, properties:Map, cookieFactory:CookieFactory, playerId:int = 0, debugLogging:Boolean = false)Parameters
gameCtrl:GameControl |
|
properties:Map |
|
cookieFactory:CookieFactory |
|
playerId:int (default = 0) |
|
debugLogging:Boolean (default = false) |
| cookiePropertyUpdated | () | method |
public function cookiePropertyUpdated(... ignored):voidParameters
... ignored |
| dispatchLoaded | () | method |
protected function dispatchLoaded():void
| getProperty | () | method |
public function getProperty(name:String):CookiePropertyParameters
name:String |
CookieProperty |
| gotCookie | () | method |
protected function gotCookie(cookie:Object, occupantId:int):voidParameters
cookie:Object |
|
occupantId:int |
| readBytes | () | method |
protected function readBytes(bytes:ByteArray):voidParameters
bytes:ByteArray |
| resumeWrites | () | method |
public function resumeWrites():voidWill allow cookie updates to cause a write to the server cookie once again. If any updates happend after stopWrites() was called, a single write will be done now.
| stopWrites | () | method |
public function stopWrites():void
| writeBytes | () | method |
protected function writeBytes(bytes:ByteArray):voidParameters
bytes:ByteArray |
| writeCookie | () | method |
protected function writeCookie(... ignored):voidParameters
... ignored |
| log | constant |
protected static const log:Log
| VERSION | constant |
protected static const VERSION:int = 2Version bumps are not required when adding new data types. Only if another form of storing data in the cookie is fashioned should a version bump be necessary.
| WRITE_DELAY | constant |
protected static const WRITE_DELAY:int = 2000Write out the cookie at most every 2 seconds, in order to prevent this manager from sucking up network resources