Packagejp.co.fujitsu.reffi.client.flex.model.messaging
Classpublic class ProducerCore
InheritanceProducerCore Inheritance BaseModel Inheritance flash.events.EventDispatcher

[概 要]

サーバ定義されているdestinationにメッセージを送信する機能モデルクラスです.

[詳 細]

destinationプロパティで設定されたdestinationへ、messageプロパティで設定された メッセージを送信します。 送信メッセージのペイロードはmessageBodyプロパティ値が適用されます。

[備 考]

View the examples



Public Properties
 PropertyDefined By
 Inheritedcontroller : BaseController
[概 要] このモデルを起動したコントローラインスタンスです.
BaseModel
  destination : String
[概 要] メッセージ送信先destinationです.
ProducerCore
 InheritedexecuteIndex : int
[概 要] 実行インデックス設定.
BaseModel
  message : IMessage
[概 要] 送信メッセージペイロードが格納されるMessageI/Fです.
ProducerCore
  messageBody : Object
[概 要] 送信メッセージペイロードです.
ProducerCore
 InheritedparameterMapping : ParameterMapping
[概 要] MVC各レイヤを伝播するパラメータオブジェクトです.
BaseModel
 Inheritedskip : Boolean
[概 要] このモデルを実行するか、コントローラが判断する為のフラグです.
BaseModel
 InheritedsuccessCount : int
[概 要] モデルインスタンス生存中に、何回モデル処理が成功したかを保持します.
BaseModel
Public Methods
 MethodDefined By
  
[概 要] コンストラクタです.
ProducerCore
 Inherited
[概 要] モデル処理失敗イベントを発行するメソッドです.
BaseModel
 Inherited
[概 要] モデル処理完了イベントを発行するメソッドです.
BaseModel
 Inherited
[概 要] モデル処理成功イベントを発行するメソッドです.
BaseModel
  
faultHandler(event:ChannelFaultEvent):void
[概 要] 送信失敗ハンドラです.
ProducerCore
 Inherited
[概 要] ModelProcessEvent.SUCCESS発行回数を1増加させます.
BaseModel
  
resultHandler(event:ChannelEvent):void
[概 要] 送信成功ハンドラです.
ProducerCore
 Inherited
run():void
[概 要] コントローラにコールされるモデルの主幹メソッドです.
BaseModel
Protected Methods
 MethodDefined By
 Inherited
[概 要] run()が終了したタイミングでテンプレートコールされるメソッドです.
BaseModel
  
mainProc():void
[override] [概 要] LCDS及びBlazeDSで定義されているサーバ側destinationへメッセージを送信します.
ProducerCore
  
onFailure(event:ChannelFaultEvent):void
[概 要] メッセージ送信失敗処理用オーバーライドメソッドです.
ProducerCore
  
onSuccess(event:ChannelEvent):void
[概 要] メッセージ送信成功処理実装用オーバーライドメソッドです.
ProducerCore
 Inherited
postProc():void
[概 要] 後処理テンプレートメソッドです.
BaseModel
 Inherited
preProc():Boolean
[概 要] 前処理テンプレートメソッドです.
BaseModel
 Inherited
trap(e:Error):Error
[概 要] run()内で発生した全例外をハンドリングするメソッドです.
BaseModel
Property Detail
destinationproperty
destination:String

[概 要]

メッセージ送信先destinationです.

[詳 細]

[備 考]


Implementation
    public function get destination():String
    public function set destination(value:String):void
messageproperty 
message:IMessage

[概 要]

送信メッセージペイロードが格納されるMessageI/Fです.

[詳 細]

[備 考]

The default value is AsyncMessage.


Implementation
    public function get message():IMessage
    public function set message(value:IMessage):void
messageBodyproperty 
messageBody:Object

[概 要]

送信メッセージペイロードです.

[詳 細]

[備 考]


Implementation
    public function get messageBody():Object
    public function set messageBody(value:Object):void
Constructor Detail
ProducerCore()Constructor
public function ProducerCore()

[概 要]

コンストラクタです.

[詳 細]

プロパティを初期化します。

[備 考]

Method Detail
faultHandler()method
public final function faultHandler(event:ChannelFaultEvent):void

[概 要]

送信失敗ハンドラです.

[詳 細]

[備 考]

Parameters

event:ChannelFaultEvent — メッセージ送信失敗イベント

mainProc()method 
override protected function mainProc():void

[概 要]

LCDS及びBlazeDSで定義されているサーバ側destinationへメッセージを送信します.

[詳 細]

destinationプロパティ値へ、messageプロパティ値を送信します。 messageBodyプロパティが設定されている場合、 messageBodyプロパティ値が送信されるペイロードになります。

[備 考]

onFailure()method 
protected function onFailure(event:ChannelFaultEvent):void

[概 要]

メッセージ送信失敗処理用オーバーライドメソッドです.

[詳 細]

[備 考]

Parameters

event:ChannelFaultEvent — メッセージ受信失敗イベント

onSuccess()method 
protected function onSuccess(event:ChannelEvent):void

[概 要]

メッセージ送信成功処理実装用オーバーライドメソッドです.

[詳 細]

[備 考]

Parameters

event:ChannelEvent — メッセージ送信イベント

resultHandler()method 
public final function resultHandler(event:ChannelEvent):void

[概 要]

送信成功ハンドラです.

[詳 細]

[備 考]

Parameters

event:ChannelEvent — メッセージ送信イベント

Examples
任意のdestinationにメッセージを送信する
        public class RemarkSendAction extends BaseAction {
        
            override protected function reserveModels(models:Array):void {
                models.push(Class(ProducerCore));
            }
    
            override public function nextModel(index:int, prev:ModelProcessEvent, next:BaseModel):Boolean {
                switch (index) {
                    case 0:
                        ProducerCore(next).destination = TextInput(getComponentByName("channelName")).text;
                        ProducerCore(next).messageBody = TextInput(getComponentByName("chatRemark")).text;
                        break;
                }
                return true;
            }
        }
     

Copyright (c) 2008-2009 FUJITSU Japan All rights reserved.