package de.dtele.net.events {
import de.dtele.net.MediaRequest;
import de.dtele.net.MediaResponse;
import flash.events.Event;
/**
* Notification for protocol handler events
*
* @author Mathias Brodala
*/
public class ProtocolHandlerEvent extends Event {
/**
* The ProtocolHandlerEvent.CONNECTED constant defines the value of the
* <code>type</code> property of the event object
* for a <code>connected</code> event.
*
* @eventType connected
*/
public static const CONNECTED:String = "connected";
/**
* The ProtocolHandlerEvent.DISCONNECTED constant defines the value of the
* <code>type</code> property of the event object
* for a <code>disconnected</code> event.
*
* @eventType disconnected
*/
public static const DISCONNECTED:String = "disconnected";
/**
* The ProtocolHandlerEvent.RESPONSE constant defines the value of the
* <code>type</code> property of the event object
* for a <code>closed</code> event.
*
* @eventType response
*/
public static const RESPONSE:String = "response";
private var _request:MediaRequest;
/**
* The request this event's response was preceded by
*/
public function get request():MediaRequest {
return _request;
}
private var _response:MediaResponse;
/**
* The response this event was dispatched for
*/
public function get response():MediaResponse {
return _response;
}
public function ProtocolHandlerEvent(type:String, request:MediaRequest=null, response:MediaResponse=null, bubbles:Boolean=false, cancelable:Boolean=false) {
super(type, bubbles, cancelable);
this._request = request;
this._response = response;
}
}
}