This event is dispatched when an RPC call has a fault.

Static variables

@:value("fault")staticfinalread onlyFAULT:EventType<FaultEvent> = "fault"

The FAULT event type.

The properties of the event object have the following values:

PropertyValue
`bubbles`false
`cancelable`true, calling preventDefault() from the associated token's responder.fault method will prevent the service or operation from dispatching this event
`currentTarget`The Object that defines the event listener that handles the event. For example, if you use `myButton.addEventListener()` to register an event listener, myButton is the value of the `currentTarget`.
`fault`The Fault object that contains the details of what caused this event.
`message`The Message associated with this event.
`target`The Object that dispatched the event; it is not always the Object listening for the event. Use the `currentTarget` property to always access the Object listening for the event.
`token`The token that represents the call to the method. Used in the asynchronous completion token pattern.

Static methods

@:value({ msg : null, token : null })staticcreateEvent(fault:Fault, ?token:AsyncToken, ?msg:IMessage):FaultEvent

Given a Fault, this method constructs and returns a FaultEvent.

Parameters:

fault

Fault that contains the details of the FaultEvent.

token

AsyncToken [optional] associated with this fault.

msg

Message [optional] associated with this fault.

Returns:

Returns a FaultEvent.

@:value({ token : null })staticcreateEventFromMessageFault(value:MessageFaultEvent, ?token:AsyncToken):FaultEvent

Given a MessageFaultEvent, this method constructs and returns a FaultEvent.

Parameters:

value

MessageFaultEvent reference to extract the appropriate fault information from.

token

AsyncToken [optional] associated with this fault.

Returns:

Returns a FaultEvent.

Constructor

@:value({ message : null, token : null, fault : null, cancelable : true, bubbles : false })new(type:String, bubbles:Bool = false, cancelable:Bool = true, ?fault:Fault, ?token:AsyncToken, ?message:IMessage)

Creates a new FaultEvent. The fault is a required parameter while the call and message are optional.

Parameters:

type

The event type; indicates the action that triggered the event.

bubbles

Specifies whether the event can bubble up the display list hierarchy.

cancelable

Specifies whether the behavior associated with the event can be prevented.

fault

Object that holds details of the fault, including a faultCode and faultString.

token

Token representing the call to the method. Used in the asynchronous completion token pattern.

message

Source Message of the fault.

Variables

@:flash.propertyread onlyfault:Fault

The Fault object that contains the details of what caused this event.

@:flash.propertyheaders:Dynamic

In certain circumstances, headers may also be returned with a fault to provide further context to the failure.

@:flash.propertyread onlystatusCode:Int

If the source message was sent via HTTP, this property provides access to the HTTP response status code (if available), otherwise the value is 0.

Methods

clone():Event

Because this event can be redispatched we have to implement clone to return the appropriate type, otherwise we will get just the standard event type.

toString():String

Returns a string representation of the FaultEvent.

Returns:

String representation of the FaultEvent.

Inherited Variables

Defined by AbstractEvent

@:flash.propertyread onlytoken:AsyncToken

The token that represents the call to the method. Used in the asynchronous completion token pattern.

Defined by MessageEvent

message:IMessage

The Message associated with this event.

@:flash.propertyread onlymessageId:String

Inherited Methods