Packagecom.akamai.hd
Interfacepublic interface ITokenService

This class defines an interface to a generic token service. Typcially a token service will accept a URL and then append to it a Akamai EdgeAuth token. For example: if the original URL is

http://vod.edgeflash.akamai.com.edgesuite.net/quantum_h264_1500k@13903?v=1.0.6.14&fp=WIN 10,0,32,18&r=WFEYN

then the URL returned would be

http://vod.edgeflash.akamai.com.edgesuite.net/quantum_h264_1500k@13903?v=1.0.6.14&fp=WIN 10,0,32,18&r=WFEYN&primaryToken=1260314417_914635b04e4f7ead4d3111d761a96667

If the class success in retrieving a token, it will call the function defined by callBackFunctionOnSuccess and hand it the toeknized URL. If the class fails to retrieve a token, it will call the function defined by callBackFunctionOnFailure and hand it a description of the error.



Public Properties
 PropertyDefined By
  callBackFunctionOnFailure : Function
[write-only] The function that the token service should call when it has failed to retrieved a token.
ITokenService
  callBackFunctionOnSuccess : Function
[write-only] The function that the token service should call when it has successfully retrieved a token.
ITokenService
Public Methods
 MethodDefined By
  
requestTokenizedURL(fullURL:String):void
Initiates a request to generate a tokenized URL.
ITokenService
Property Detail
callBackFunctionOnFailureproperty
callBackFunctionOnFailure:Function  [write-only]

The function that the token service should call when it has failed to retrieved a token. The reason for the failure should be handed to that function as a String. Normally we would use an event for this asynchronous operaiton, but AS3 doesn't let us define events as part of an interface.


Implementation
    public function set callBackFunctionOnFailure(value:Function):void
callBackFunctionOnSuccessproperty 
callBackFunctionOnSuccess:Function  [write-only]

The function that the token service should call when it has successfully retrieved a token. The tokenized URL should be handed to that function as a String. Normally we would use an event for this asynchronous operaiton, but AS3 doesn't let us define events as part of an interface.


Implementation
    public function set callBackFunctionOnSuccess(value:Function):void
Method Detail
requestTokenizedURL()method
public function requestTokenizedURL(fullURL:String):void

Initiates a request to generate a tokenized URL. This asynchronous request can have only two outcomes - success or failure. On success, the callback function defined by the callBackFunctionOnSuccess() setter will be called. On failure, the callback function defined by the callBackFunctionOnFailure() setter will be called.

Parameters

fullURL:String — The full URL to be tokenized.